Class: Bs_XStorage
Source Location: /applications/cms/Bs_XStorage.class.php
Bs_Object
|
--Bs_XStorage
XStorage class
Author(s):
Version:
- 4.3.$Revision: 1.2 $ $Date: 2003/08/09 15:22:34 $
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Class Methods
constructor Bs_XStorage [line 38]
Bs_XStorage Bs_XStorage(
)
|
|
Constructor.
method deleteNode [line 1018]
method getCandidateUIDs [line 794]
array getCandidateUIDs(
object
&$parentNode, string
$source, array
$xAtomProfile)
|
|
Get the list of candidates as array of UID's SOME INFO: To make this function as flexible as possible a whole set of attributes can be passed with the $xAtomProfile. If $source == 'db' I'm sure we're able to narrow the possible candidates to a minimum. If $source == 'file' we're only able to use a small number of the profile attributes (corename, lang, version, mime, fileExt). This will result in a larger list of UID's that must be further analyzed by the calling routine. Profile Strukture $xAtomProfile = array { 'element' => NULL, // <- the element we are looking for. E.g. 'page', 'layout', 'block', ... 'mime' => '' // <- if element == 'block' this will describe what type of block it is e.g. text, image, ... 'lang' => 'xx', // <- the ISO language code ('' OR 'xx' == any lang, en == all en-pages: en-uk, en-us, ...) 'coreName' => '.*', // <- core name (and path) of the element. (No version, no extention, no nothing.) 'version' => 'x.x.x', // <- a nomalized version-mask string 'fileExt' => '', // <- XML source file use this extention. Only unsed when source is a file (not a Db) 'alive' => array( // <- the alive info. If empty we assume active/alive 'isDeactivated' => FALSE, // <- if TRUE we are never alive 'startDatetime' => '0000-00-00 00:00:00', // <- the start datetime in gmt. 'endDatetime' => '0000-00-00 00:00:00' // <- the end datetime in gmt. ), 'browscap' => array( // <- the browscap info. If empty we assume no restrictions are mad 'browser' => "", // <- cvs-list of accepted browsers E.g. "ie4+;ns4+" 'feature' => "", // <- cvs-list of needed features E.g. "javaScript" 'plugin' => "" // <- cvs-list of needed plugins E.g. "flash;pdf" ), ); SAMPLE: If profile contais coreName='main', version ='1.x.x' and the parent node is pointing to '/p/' Then return would be an array of UID's E.g.: array('/p/main.1.1.1','/p/main.1.2.1')
Tags:
Parameters:
method loadXAtom [line 55]
void loadXAtom(
mixed
&$xAtomObj)
|
|
method moveNode [line 1015]
method persist [line 954]
bool persist(
object
&$xAtomObj)
|
|
Persist the xAtom-element.
Tags:
Overrides Bs_Object::persist() (Persists this object by serializing it and saving it to a file with unique name.)
Parameters:
method _exclusiveWrite [line 898]
void _exclusiveWrite(
string
$pathFile, string
$out)
|
|
didn't i move this to the bs_file class?? please have a look. --andrej Exclusive file write. Try to get hold of a file exclusively and overwrite it with the passed data.
Parameters:
method _initXPath [line 1110]
bool _initXPath(
object
&$xAtomObj)
|
|
If we are working with file based Nodes, Pages, Layouts, Blocks, ... we have to use xPath object to parse those objects So we use this function to do that job. NOTE: In case of failure we set the $object->_failedReason.
Tags:
Parameters:
method _loadBlock [line 459]
TRUE _loadBlock(
object
&$xAtomObj)
|
|
XPath load of specialized data of element Block. NOTE: Errorhandling is as follows: We set the _failedReason of the passed object and return FALSE. Then let the caller handle the error.
Tags:
Parameters:
method _loadBlockTableLayoutCell [line 728]
mixed _loadBlockTableLayoutCell(
string
$baseKey, [string
$cellType = 'CELL'])
|
|
helper function to load the blocks
Tags:
Parameters:
method _loadBlockTableLayoutRow [line 675]
array _loadBlockTableLayoutRow(
string
$baseKey, [string
$rowType = 'ROW'])
|
|
Tags:
Parameters:
method _loadFromCache [line 1046]
bool _loadFromCache(
object
&$xAtomObj)
|
|
Load parsed XML data *from* a file cache.
Tags:
Parameters:
method _loadGuard [line 254]
TRUE _loadGuard(
object
&$xAtomObj)
|
|
XPath load of specialized data of element Guard. NOTE: Errorhandling is as follows: We set the _failedReason of the passed object and return FALSE. Then let the caller handle the error.
Tags:
Parameters:
method _loadLayout [line 389]
TRUE _loadLayout(
object
&$xAtomObj)
|
|
XPath load of specialized data of element Layout. NOTE: Errorhandling is as follows: We set the _failedReason of the passed object and return FALSE. Then let the caller handle the error.
Tags:
Parameters:
method _loadNode [line 185]
TRUE _loadNode(
object
&$xAtomObj)
|
|
XPath load of specialized data of element Node. NOTE: Errorhandling is as follows: We set the _failedReason of the passed object and return FALSE. Then let the caller handle the error.
Tags:
Parameters:
method _loadPage [line 281]
TRUE _loadPage(
object
&$xAtomObj)
|
|
XPath load of specialized data of element Page. NOTE: Errorhandling is as follows: We set the _failedReason of the passed object and return FALSE. Then let the caller handle the error.
Tags:
Parameters:
method _loadToCache [line 1080]
bool _loadToCache(
object
&$xAtomObj)
|
|
Load parsed XML data *to* a file cache.
Tags:
Parameters:
|
|