Main skin class for managing skin wrappers around the content.
The Web Application's WFRequestController object always uses exactly one skin instance to render the page. However, your application may choose to create other skin instances to use the infrastructure for things like HTML email, etc.
The Skin mechanism is broken down into three layers. Each layer provides the ability to swap behaviors/looks at runtime. For each request, one of each layer must be specified.
Skin Directory Structure: The skins have a specified, hierarchical directory structure, based in the "skins" directory. skins/ - Contains only directories; each directory represents a Skin Type. skins/<skinType>/ - For each skin type, pick a unique name and create a directory. skins/<skinType>/<skinType>_SkinDelegate.php - A php file containing exactly one class, named <skinType>_SkinDelegate, that is the WFSkinDelegate for the Skin Type. skins/<skinType>/<skinName>/ - Also in the skinType directory are other directories, one for each skin that can be used for the Skin Type. skins/<skinType>/<skinName>/<skinName>_SkinManifestDelegate.php - The WFSkinManifestDelegate for the skin <skinName>. skins/<skinType>/<skinName>/* - Other files in here are the various tpl and css files used for this skin. skins/<skinType>/<skinName>/www/ - Web root of the skin. Nothing actually goes in this folder but other folders. skins/<skinType>/<skinName>/www/shared/* - Files that need to be accesible to the WWW and are shared by multiple themes of this skin go here. skins/<skinType>/<skinName>/www/<themeName>/* - Files that need to be accessible to the WWW and are specific to a theme go here. Each theme has its own folder to contain "themed" versions of resources. Typically every theme has the same set of resources, but of course customized for that theme. To use WWW visible items in your pages, simply use {$skinDir}/myImage.jpg and {$skinDirShared}/mySharedImage.jpg in your templates. The skin system automatically assigns these vars. skinDir maps to skins/<skinType>/<skinName>/www/<themeName>/ skinDirShared maps to skins/<skinType>/<skinName>/www/shared/
Located in /framework/WFSkin.php (line 176)
WFObject | --WFSkin
Get a list of all installed skin types.
Add a string that needs to go in the page's head section.
Add meta keywords to the skin.
Get the name of the Skin Type for the current instance.
return a path to the skin image dir
return a path to the skin shared image dir
Get a list of all installed skins for the current Skin Type.
Allow the skin delegate to load the default values for this skin.
Load the current skin.
Get the named content from the delegate.
Get the catalog (ie list) of named content for this skin from its delegate.
If the skin delegate supports additional content for the skin, the catalog of content is provided here. Mostly this is for documentation purposes.
Render the skin.
Set the content for the skin to wrap. Typically this is HTML but could be anything.
Assign a skin delegate for this instance.
Set the skin's delegate by passing the NAME of the skin delegate.
This function will look for the skin delegate in the appropriate place, instantiate it, and set it up for this skin instance.
Set the template file to be added to the "head" element of every page. Defaults to the built-in template file that sets up various PHOCOA things.
If you want to include the default head content, use {$skinPhocoaHeadTpl} in your custom head template file.
Typically this function would be called from your SkinDelegate's loadDefaults() function.
Set the META DESCRIPTION of the page.
Set the skin to the given name. Will automatically load the skin and its default theme.
Set the which template file of the current skin will be used to render the skin.
Set the theme to use.
Set the title of the page. This is the HTML title if you are building an HTML skin.
Get the current skin name
Get a list of all template types available for this skin.
This list will include WFSkin::SKIN_WRAPPER_TYPE_NORMAL, WFSkin::SKIN_WRAPPER_TYPE_RAW, and any custom template types manifested by the skin type delegate (skin manifest delegate).
Pre-render callback.
Calls the skin delegate's willRender() method if it exists. This method is called just before the template for the skin is rendered.
Inherited From WFObject
WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForUndefinedKey()
WFObject::__toString()
Documentation generated on Thu, 17 Apr 2008 13:52:09 -0400 by phpDocumentor 1.4.1