glPage version 0.3.beta
The zip file obtained from geekLog contains:
The directory 'glpage' is downloadable here as Attach:glpage.zip.
Contents of glpage:
Contents of _testing:
Contents of _examples:
The glPage class is principally a static factory for page objects. The static singleton contains a Outline, basicly the name of the overal page. After setting the outline name, page objects can be instantiated. The initial one is instantiated within proxy.php with the name 'geeklog' in the variable $_PAGE. A page object must have one or more layout(s) added, which is referenced when setting or adding content. Messages can be added per layout. A skin can be added per layout. A page object can be rendered by getting the pageContent or calling renderPage. $_PAGE->getPageContent() delivers the content your code created. $_PAGE->renderPage() delivers the complete page as a geeklog page.
WTF is a layout? A layout is a string containing names of blocks that reference your wireframe setup. Such a name will be unique. Same names refer to same content. Beware !! Example: 'header,body,footer'. No spaces allowed !! A layout can contain css-namespaces for the class attribute and the id attribute. Example: 'header:myID:myClass'. Note: a layout named 'prefix' or 'suffix' will NOT be glued and are considered as the actual glue. This is needed for forms and alike to separate the form tag and the its closing tag.
WTF is a css-namespace? Most html tags can contain a class attribute which are referenced in css stylesheets. These class attributes can force a naming clash and therefor class names are prefixed with a namespace identifier. Same goes for id attributes. Namespace identifiers can be set for any named layout but are not inherited.
WTF is a skin? A special class name can be attached to any layoutname. Even multiple. The css must define the special skinny features.
WTF is a Resource? A resource is either a js, either a css. A resource can be added or set. CSS resources always appear in the head, while JS resources appear in the head by setResource() or are appended at the end by addResource(). Single scripts code and/or style code can be inserted also by addScript() and/or addStyle(). Similar works addLibary() and setLibrary().
Well, well. Messages? Yes. Messages will display stacked on top (as Geeklog does). However, by supplying the name of the layout containerin addMessage(), the messages can insert in the very container.
Huh! Exceptions? Yes, sure, exceptions. glPage is throwing exceptions (and catches them) when appropiate. The glErrorHandler.class is handling uncaught exceptions and hopefully will make it to the GL core sometime.
ChangeLog. 03.beta.
02.beta.
01.beta.
RoadMap.
2015:
2014:
Have fun. Current code is totally free and donated to you.
'Use it 'as is' and on your own risk.'
There is nothing to claim when the code fails, crashes your site or whatsoever.