Class CGIKit::Application
In: lib/cgikit/ajax/handler.rb
lib/cgikit/application.rb
lib/cgikit/lang/ja.rb
lib/cgikit/rss/handler.rb
Parent: Object

Methods

Included Modules

KeyValueCoding Logging

Constants

COMPONENT_REQUEST_HANDLER_KEY = 'c'
DIRECT_ACTION_REQUEST_HANDLER_KEY = 'd'
RESOURCE_REQUEST_HANDLER_KEY = 'r'
CGIKIT_LIB = 'cgikit'   backward compatibility
COMPONENT_LIB = 'components'
DATA_PATH = 'data'
CGIKIT_PATH = 'cgikit'
PACKAGE_PATH = 'packages'

External Aliases

resource_path -> resources
resource_path= -> resources=
web_server_resource_path -> web_server_resources
web_server_resource_path= -> web_server_resources=
validate_api -> validate_api?

Attributes

adapter  [RW]  Adapter object.
adapter_class  [RW]  Adapter class. The default value is CGI class.
ajax_action_class  [RW] 
auth_by_remote_addr  [RW]  Enables or disables session authorization by IP addresses. If you set the value to true, the application raises error when an user accesses it with IP address that is different from one registered session.
auth_by_user_agent  [RW]  Enables or disables session authorization by browsers. If you set the value to true, the application raises error when an user accesses it with browser that is different from one registered session.
baseurl  [RW]  The application URL based on SCRIPT_NAME.
cache_template  [RW]  Whether or not caches templates to reduce parsing load.
component_path  [RW] 
component_paths  [RW]  The file system paths for components. Components are searched under it.
component_request_handler  [RW]  Request handler for components.
component_request_handler_key  [RW]  Request handler key to display components.
concurrent_request_handling  [RW] 
context_class  [RW]  Context class. Default class is CGIKit::Context.
database  [RW] 
datadir  [RW] 
default_request_handler  [RW]  Default request handler key. Default key is component request handler key.
direct_action_class  [RW]  Direct action class. Default class is CGIKit::DirectAction.
direct_action_request_handler  [RW]  Request handler for direct actions.
direct_action_request_handler_key  [RW]  Request handler key to invoke direct actions.
direct_action_session_key  [RW]  Session key in direct action. This key is used in hidden fields of form and URL when using direct action.
document_root  [RW]  Document root directory.
encoding  [RW]  Encoding to encode character code of form data. The default implementation uses Kconv to encode Japanese character codes. Then specify constant values of Kconv; Kconv::JIS, Kconv::SJIS, Kconv::EUC, etc. If the value is nil, form data is not encoded. The default value is nil.
error_page  [RW]  Name or class of an error page component to show caught errors.
htmlparser_class  [RW]  HTML parser class. Default class is CGIKit::HTMLParser::HTMLParser.
log_options  [RW] 
logger  [RW] 
main  [RW]  Main component. If session ID or context ID aren’t specified, this component is shown. The default value is MainPage.
main_package_options  [RW] 
model_path  [RW] 
package_paths  [RW] 
page_cache_size  [RW]  Size to cache components permanently in session. Newly generated page is cached automatically. If holded page size is over the value, oldest pages are deleted.
path  [RW]  The file system path of the application.
permanent_page_cache_size  [RW]  Size to cache components permanently in session. Permanent page cache is cached optionally, not automatically caching. If holded page size is over the value, oldest pages are deleted.
precede_iconv_as_rexml_encoding_module  [RW] 
required_packages  [RW] 
resource_manager  [RW]  ResourceManager object.
resource_path  [RW]  Resource directory. This directory includes files to be used by the application,
resource_request_handler  [RW]  Request handler for resources.
resource_request_handler_key  [RW]  Request handler key to display resource files.
resource_store  [RW] 
resource_store_class  [RW] 
rss_action_class  [RW] 
session_class  [RW]  Session class. Default class is CGIKit::Session.
session_cookie_expires  [RW]  Expiry date of cookie for session. If you set the value to nil, session cookies will be invalid when closing browser.
session_key  [RW]  Session key. This key is used in cookie.
session_store_class  [RW]  Session store class. Default class is CGIKit::FileSessionStore.
store_in_cookie  [RW]  Enables or disables the use of cookies for storing session IDs.
store_in_url  [RW]  Enables or disables the use of URLs for storing session IDs.
sweep_password  [RW] 
template_store  [RW] 
template_store_class  [RW] 
timeout  [RW]  Seconds until the session has timed out.
tmpdir  [RW]  Temporary directory to be used by the framework. The framework uses this to store sessions and template caches.
validate_api  [RW]  Whether or not validates setting of attributes for each elements. If wrong attribute name or combination are found, raises error.
web_server_resource_path  [RW]  Web server resources directory. This directory includes files to be displayed to browser. The files are used by Image element, etc.
xmlhttp_var  [W] 

Public Class methods

Public Instance methods

Creates an adapter object.

Creates a session.

Return a default error page component.

Handles every errors and return an error page component.

backward compatibility

Returns the name of the application without file extension.

Creates a specified page component.

Returns a restored session objects with session ID.

Saves the session, and set a cookie if "store_in_cookie" attribute is setted. If "clear" method of the session is called, the session is deleted.

[Validate]