The webpage page class.
This is the main focus of the Axyl framework for generating webpage content of any kind and for any device. We envisage the standard page structure with a head, body and foot section. Depending on the device this might not be exactly right, but it doesn't really matter, since you have complete control over the content.
Located in /webpage-defs.php (line 466)
user | --session | --webstream | --webpage
Class | Description |
---|---|
![]() |
THE RESPONSE CLASS |
Webpage body object
Webpage foot object
True if page has been generated
Webpage head object
Set of plugins with content
The name of the template which was applied, if any
The file the template content is to be found in
Theme to apply to the page. This should be a single-word ID, and
there should be a sub-directory of the same name in the 'templates' directory, with templates and stylesheet(s) in it which comprise the theme. This is how we provide different template sets and stylesheets for branding purposes.
Inherited from webstream
webstream::$buffered
webstream::$cached
webstream::$cache_expiry
webstream::$cache_path
webstream::$cache_regen
webstream::$content
webstream::$replacement
Inherited from session
session::$cookiename
session::$db_backed
session::$error_message
session::$guest_browser_lifetime
session::$last_logintime
session::$lifetime
session::$logins_exceeded_msg
session::$logins_exceeded_option
session::$logins_exceeded_redirect
session::$login_type
session::$session_id
session::$session_record
Inherited from user
user::$auth_code
user::$email
user::$enabled
user::$encrypted_passwords
user::$group_info
user::$group_names
user::$hasgroups
user::$hasIPlist
user::$IP
user::$limit_logins
user::$name
user::$password
user::$total_logins
user::$userid
user::$user_groups_cnt
user::$user_record
user::$user_type
user::$valid
Constructor Create a new webpage object. When this object is created it implicitly starts buffering with the ob_start() call by creating a webstream.
NOTES: If you name your stylesheets after the APP_PREFIX (see your application.php setup file), eg: 'haka.css' and 'haka_ie.css', then the system will find them for you. The same applies if you call them 'sitestyle.css' and 'sitestyle_ie.css'.
Add to the body content
Add named script This adds a specific lump of script to the body under a unique name.
It allows you to collect multiple additions of script content under a single grouping, and so cause the final rendering to group it all together.
Add named script to the body
Add script URL to the body
Assign the DTD for the resident head page section. We have two ways to do this: directly via passed parameter $DTD, or indirectly by using the content (browser) type, and looking up the DTD from the array of DTD specifiers created in the response object.
Generate the webpage content This routine is usually called after all the set-up calls for the head, body etc. have been made. This echoes each page section to the buffer, in preparation for delivery to the browser.
Get the filenames for the main stylesheet and (optionally) the
stylesheet for Internet Explorer compatible browsers. Note: this should only be a filename, not a path. If a theme has been defined then the stylesheet will be expected to be in the subdirectory of the same name as the theme, under the 'templates' directory. If not then the stylesheet is expected to be in the website root dir. Defaults are in effect as follows: If the stylesheet is nullstring, then we look for a stylesheet in the appropriate directory with a name of APP_PREFIX.css. If that isn't found we try looking for 'sitestyle.css'. Same applies for the IE stylesheet, but with "_ie" appended to the filename part. We return the results in an associative array, with elements: returned_array["css"] = standard stylsheet returned_array["css_ie"] = IE stylsheet returned_array["css_ns"] = Netscape 4.xx stylsheet
End inline buffering Usually used as in: <?php $s = $page->inline_end(); Then $s will contain all the HTML between inline_start/inline_end.
Begin inline buffering
If you want to include some 'naked' HTML in-line with your webpage content, then call this method, then close the Php script with the usual "?>" tag. Follow this with your HTML, then restart Php script and grab the resulting HTML with... <?php $s = $page->inline_end(); Then $s will contain all the HTML between inline_start/inline_end.
Insert a ready-made meta tag object into the webpage head section.
Add content to a plugin Plugins are regions of a webpage which you want to plug content into.
This is the method to call to add content to a named region or plugin. The plugin ID (name) is related to a COMMENT TAG which appears in the template of the page. If the plugin doesn't exist then one is created otherwise the content is simply appended to that already defined. The 'content' can be any one of the following types: String - A literal string of content to put in the plugin Path - Path to a file containing content (can be relative) Function - A function definition, eg: "foo('xyx')" to return content Object - An object. Must be a descendant of RenderableObject. NB: This method can be called multiple times for the given plugin ID, and content will be accumulated each time. NB: When you nominate an object or a function to provide content, the system assumes you want these generated "late" - ie. at the time the webpage is being sent back to the user agent. If you want content to be inserted early, then use literal strings.
Start/stop inline plugin content definition
This method allows plugin content to be taken from inline content in the script page itself. At the start of the content call this method with the name of the plugin (pluginid) you want to put the content into. At the end of the content, call this method with no parameter.
Define or redefine a plugin. This acts similarly to the above plugin() method, except that here we replace the existing content, if any is present, with this content.
Add a meta tag to the webpage head section.
Define the script to execute after page has loaded
Define the style settings for the webpage. Usually the stylesheet will be all you require, however occasionally it is necessary to have specific styles for a page. Set these here, but make sure to provide the FULL style complete with <style></style> tags.
Set the filenames for the main stylesheet and (optionally) the stylesheet for Internet Explorer compatible browsers.
Define the template for the webpage.
The $templatename can be the special "plain" which is a pseudo template of vanilla content, a fll path to a file, or a name. If it is a simple name, then the system knows where to find it and constructs a full path to the file from it.
Define the theme
Set the theme to apply to the page. This should be a single-word ID, and there should be a sub-directory of the same name in the 'templates' directory, with templates and stylesheet(s) in it which comprise the theme. This is how we provide different template sets and stylesheets for branding purposes.
Define the webpage title
Inherited From webstream
webstream::webstream()
webstream::add_content()
webstream::cache()
webstream::close_webstream()
webstream::discard()
webstream::length()
webstream::open_webstream()
webstream::replace()
webstream::replace_content()
webstream::reset_webstream()
webstream::send_errorcode_and_die()
webstream::send_error_and_die()
webstream::send_to_browser()
webstream::send_to_file()
webstream::webpage_content()
Inherited From session
session::session()
session::delete_cookie()
session::identify_user()
session::on_logins_exceeded()
session::recover()
session::session_clear()
session::session_create()
session::session_delete()
session::session_valid()
session::set_cookie()
session::set_cookiename()
session::set_guest_browser_lifetime()
session::set_lifetime()
session::set_sessiontype()
Inherited From user
user::user()
user::authenticate()
user::authenticate_authid()
user::authenticate_ipaddress()
user::authenticate_userid()
user::friendlyName()
user::get_auth_code()
user::get_groups()
user::get_user_by_auth_code()
user::get_user_by_id()
user::get_user_by_ip()
user::group_ids_list()
user::group_names_list()
user::ismemberof_group()
user::ismemberof_group_in()
user::ismemberof_group_with_id()
user::isvalid()
user::set_encrypted_passwords()
user::set_password()
Documentation generated by phpDocumentor 1.3.0RC3