|
||||
[previous page]  |  [up one level]  |  [next page] | ||||
|
ZenContentManager
package : ZenEngine/Core
Author : Bruno Desthuilliers Version : 0.0.5 public class ZenContentManagerThe ZenContentManager's job is to retrieve actual content associated with a ZenMenuItem object.Note that the contentManager does no create Documents. This part is delegated to docMakers. The contentManager look up for the concrete docMaker to instanciate for the menuItem's docType, and pass back the document created by the docMaker. Client code may either send a getDocumentFor(ZenMenuItem) message, or retrieve a docMaker via the getDocMakerFor(DocType) message. The structure of the ContentManager conf file is: [docType] docMakerClass=[name of the docMaker class to instantiate for this docType] docMakerPath=[string, path to the file where the docMaker class lives] docMakerConf=[string, path to the conf file for the docMaker-docType association] Note that the docMakerPath is relative to php_include_path/ZenEngine/, so the docMaker class file must live somewhere in the ZenEngine directory, and that the docMakerConf path is relative to the calling PHP/HTML page path Functionspublic void ZenContentManagerParses the conf file.
Parameters : string $config_file : path to the config file Return : (void) public mixed getDocumentForReturn the ZenDocument object corresponding to the menuItem, or null.
Look up for the concrete docMaker and conf file for the menuItem's docType, instanciate the docMaker, invoke its makeDocument() method, and send back the document. Parameters : object A $menuItem : ZenMenuItem Return : (mixed) A ZenDocument, or null if fail public mixed getDocMakerForInstantiate and return the docMaker associated with the gievn docType.
This method is used internally and by ZenFSComposedDocMaker. You shouldprobably not have the need to use it. Parameters : string $docType : docType for the wanted docMaker Return : (mixed) a docMaker or null public string getErrorMsgReturn an error message if getDocumentFor() failed
Return : (string) an error message or an empty string private void getContextForParameters : $menuItem Return : (void) variablesprivate string $_configconfig for the contentManager, as an assoctiave array of docType : [docMakerClass, docMakerPath, docMakerConf] pairsprivate string $_errorMsgError message, set by getDocumentFor() if failsIn fact, just return the docMaker error message. |
|||
[previous page]  |  [up one level]  |  [next page] |