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

Class: Bs_Node

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

Class Overview

Bs_Object
   |
   --Bs_XAtom
      |
      --Bs_Node

Node 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 17]
Node Class



Tags:

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


[ Top ]


Class Variables

$_dataContainer = array(     'navCaption'    => '',            'node'          => array(
        'name'         => '',               'version'      => '',               'caption'      => '',               'title'        => '',               'description'  => '',               'keywords'     => '',               'author'       => '',               'visible'      => '',               'redirect'     => NULL,             'verbose'   => array(                 'redirect'      => NULL,           ),'guardRef'=>array('name'=>'','ref'=>array('parentUni'=>'','coreName'=>''),'version'=>'','source'=>'',),),)

[line 24]


Type:   mixed


[ Top ]

$_page =  NULL

[line 60]

The child page we determined when a http query hits this Node.



Tags:


Type:   mixed


[ Top ]



Class Methods


constructor Bs_Node [line 66]

Bs_Node Bs_Node( )

Constructor.



[ Top ]

method init [line 87]

bool init( mixed $UID, [bool $originNode = FALSE])

Init this object using UID (Unified ID).

Tell the system if this is the origin Node (the start Node when rendering). The origin Node is needed to check access rights when referencing elements (e.g. Blocks, Layouts, ...) in other Nodes.

NOTE: In case of Node the core name is always an empty string. (huh, what core name? --andrej)




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

Parameters:

mixed   $UID   (see Bs_XAtom->init().)
bool   $originNode   (see above)

[ Top ]

method preRenderNode [line 204]

bool preRenderNode( )

************************************************************************ 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 A) -> a) Create Node and determine Page and Guard <- We're here b) Page tries to determine Layout 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 Page (and a Guard). We triggern then the Page 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 Page as a child to this Node.
(2do) - To append a valid Guard as a child to this Page.

NOTE: At the end of this routine there will be a child Page object appended to this Node called '$this->_page' BUT it may *not* be valid. The reason is that it represents the *invalid* Page and contains error and trace information.




Tags:

return:  TRUE on success; FALSE otherwise.
see:  determinePage()


[ Top ]

method render [line 247]

void render( )

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



[ Top ]

method toString [line 257]

void toString( )

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



Overrides Bs_Object::toString() (Dumps the content of this object to a string using PHP's var_dump().)

[ Top ]


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