blueshoes php application framework and cms            applications_cms
[ class tree: applications_cms ] [ index: applications_cms ] [ all elements ]

Class: Bs_Page

Source Location: /applications/cms/Bs_Page.class.php

Class Overview

Bs_Object
   |
   --Bs_XAtom
      |
      --Bs_Page

Page Class


Author(s):

Version:

  • 4.3.$Revision: 1.2 $ $Date: 2003/08/09 15:22:34 $

Copyright:

  • blueshoes.org

Variables

Methods


Inherited Variables

Inherited Methods

Class: Bs_XAtom

Bs_XAtom::Bs_XAtom()
Constructor.
Bs_XAtom::datetimeInRange()
Tells if this element is ALIVE.
Bs_XAtom::getFailedReason()
Tells what went wrong.
Bs_XAtom::init()
Init this object using UID (Unified ID).
Bs_XAtom::isAlive()
Tells if something (page, node, block, whatever) with the given properties is alive or not.
Bs_XAtom::matchBrowser()
tells if the current user browser (manufacturer and version) matches.
Bs_XAtom::matchFeature()
tells if the current user browser features match.
Bs_XAtom::matchPlugin()
tells if the current user browser plugins match.
Bs_XAtom::normalizeRef()
Normalize the references to the varius elements and return an hash
Bs_XAtom::normalizeVersion()
Normalize a version string and return it See info in header of this file.
Bs_XAtom::persist()
Use the XStorage to persist any XAtom
Bs_XAtom::reset()
Reset the whole object
Bs_XAtom::toXml()
Generate a XML output of the element (Node, Page, Layout, Block ...)
Bs_XAtom::_basicInit()
Init some very basic setup stuff that is directly related to the UID
Bs_XAtom::_normalizeContainer()
This may have to be done if the input is from a soucre that is written by human.

Class: Bs_Object

Bs_Object::Bs_Object()
Bs_Object::getErrors()
Basic error handling: Get *all* errors as string array from the global Bs_Error-error stack.
Bs_Object::getLastError()
Basic error handling: Get last error string from the global Bs_Error-error stack.
Bs_Object::getLastErrors()
Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors().
Bs_Object::persist()
Persists this object by serializing it and saving it to a file with unique name.
Bs_Object::setError()
Basic error handling: Push an error string on the global Bs_Error-error stack.
Bs_Object::toHtml()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::toString()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::unpersist()
Fetches an object that was persisted with persist()

Class Details

[line 22]
Page Class

dependencies: Bs_XAtom, Bs_Layout, Bs_FileCache




Tags:

copyright:  blueshoes.org
pattern:  singleton: (pseudostatic)
access:  public
version:  4.3.$Revision: 1.2 $ $Date: 2003/08/09 15:22:34 $
author:  Sam Blum <at blueshoes dot org>, andrej arn <andrej at blueshoes dot org>


[ Top ]


Class Variables

$_dataContainer = array(        'page'          => array(
        'name'         => '',               'version'      => '',               'access'       => 'public',         'weight'       => 0,                'cacheExpire'  => '',               'layoutRef'    => array(   
            'name'         => '',                   'ref'          => array(                    'parentUni'    =>'',                       'coreName'     =>''                     ),'version'=>'','source'=>'',),'blockRef'=>array(),),)

[line 42]

STRUCTURE DETAILS:

BlockRef Hash: BlockRef[<bloc-Name>] = array( 'name' => '', // <- base name (no ext.) 'ref' => array( // <- A ref stucture to an element ( see XATOM->normalizeRef() ) 'parentUni' =>'', // <- parent Node UNI 'coreName' =>'' // <- core name of element (No version, no extention) ), 'version' => '', // <- version-mask of the layout 'source' => '', // <- "file" | "db" );



Type:   mixed


[ Top ]

$_layout =  NULL

[line 72]

The child Layout we determined when a http query hits this Page



Tags:


Type:   mixed


[ Top ]



Class Methods


constructor Bs_Page [line 78]

Bs_Page Bs_Page( )

Constructor.



[ Top ]

method determinePage [line 125]

object determinePage( mixed &$parentNode)

Determines the right Page.



Tags:

throws:  FALSE on error
access:  public


[ Top ]

method init [line 93]

bool init( mixed $UID)

Init this object using UID (Unified ID).



Overrides Bs_XAtom::init() (Init this object using UID (Unified ID).)

Parameters:

mixed   $UID   (see Bs_XAtom->init().)

[ Top ]

method preRenderPage [line 344]

bool preRenderPage( mixed &$originNode)

************************************************************************ Do all the work that has to be done, without rendering.

This function is called upon a http request to a Node and cascades through all XAtom-types to do a pre rendering: We are in stage B) a) Create Node and determine Page and Guard -> b) Page tries to determine Layout <- We're here c) Layout tries to determine sub-Layouts and Blocks d) sub-Layouts determin Blocks (and subsub Layouts a.s.o.)

Together with the Session- and bs- environment we try to find the matching XAtom belonging below us. In this case a Layout. We triggern then the Layout to also do a pre render and to find it's child XAtoms as well. At the end we schould have following tree stucture:

We're here a) b) c) d) Node +--> _guard +--> _page +--> _layout +--> _subLayouts[0] | +--> _blocks[0] (part xxx) | +--> _blocks[1] (part xxx) +--> _subLayouts[1] | +--> _blocks[0] (part xxx) +--> _block[0] (part xxx) +--> _block[1] (part xxx) Main Goal:

  • To append a valid Layout as a child to this Page.
NOTE: At the end of this routine there will be a chile Layout appenden to this Page BUT it may *not* be valid. The reason is that it represents the *invalid* Layout and contains error and trace information.




Tags:

return:  TRUE on success; FLASE otherwise.
see:  see Bs_Node::preRenderNode()
see:  determineLayout()
access:  public


[ Top ]

method render [line 415]

void render( )

************************************************************************



Tags:

deprecated:  - this method is not used at all as i noticed. 2002/01/13 --andrej


[ Top ]

method returnCached [line 106]

mixed returnCached( )

checks if the page is cached (as whole finished output) and if it can be used.

returns it if that's the case, otherwise returns FALSE.




Tags:

return:  (string or bool FALSE)
access:  public
author:  andrej


[ Top ]


Documentation generated on Mon, 29 Dec 2003 21:12:30 +0100 by phpDocumentor 1.2.3