| applications_smartshop

# Class: Bs_Ss_XStorage Source Location: /applications/smartshop/Bs_Ss_XStorage.class.php
### Class Overview
    Bs_Object
       |
       --Bs_Ss_XStorage
SmartShop XStorage Class #### Author(s): andrej arn <at blueshoes dot org>, Sam Blum <sam at blueshoes dot org> #### Version: 4.3.$Revision: 1.3 $ $Date: 2003/08/09 15:22:35 $ #### Copyright: blueshoes.org | ### Variables $dataDir $_APP $_xPath | ### Methods Bs_Ss_XStorage loadXAtom persist removeCdataTags _initXPath _loadCategory _loadFromCache _loadProduct _loadShop _loadToCache
### Inherited Variables | ### Inherited Methods #### 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 45] SmartShop XStorage Class dependencies: XPath, Bs_XmlParser, Bs_Dir, Bs_File, Bs_FileCache #### Tags:
copyright: | blueshoes.org
pattern: | singleton: (pseudostatic)
access: | public
version: | 4.3.$Revision: 1.3 $ $Date: 2003/08/09 15:22:35 $
author: | andrej arn <at blueshoes dot org>, Sam Blum <sam at blueshoes dot org>
[ Top ] ### Class Variables #### $dataDir = [line 82] location of the data dir. most prolly specified in the global.conf and then assigned to this var. #### Tags:
access: | public
Type: | string
[ Top ] #### $_APP = [line 50] reference to the global settings array
Type: | mixed
[ Top ] #### $_xPath = NULL [line 57] reference to XPath object (static)
Type: | object
[ Top ] ### Class Methods ### constructor Bs_Ss_XStorage [line 88]
`Bs_Ss_XStorage Bs_Ss_XStorage( )`
Constructor. [ Top ] ### method loadXAtom [line 107]
`bool loadXAtom( mixed &$xAtomObj)`
loads the object. [ Top ] ### method persist [line 620]
`bool persist( object &$xAtomObj)`
Persist the xAtom-element. #### Tags:
return: | TRUE on success, FALSE otherwise.
Overrides Bs_Object::persist() (Persists this object by serializing it and saving it to a file with unique name.) #### Parameters:
object | $xAtomObj | the element to persist
[ Top ] ### method removeCdataTags [line 816]
`string removeCdataTags( string $value)`
removes the <![CDATA[ and ]]> tags in a string. #### Parameters:
string | $value |
[ Top ] ### method _initXPath [line 767]
`bool _initXPath( object &$xAtomObj)`
If we are working with file based objects we have to use xPath object to parse those objects So we use this function to do that job. NOTE I: In case of failure we set the $object->_failedReason. #### Tags:
return: | TRUE on success and FALSE otherwise
#### Parameters:
object | &$xAtomObj | any object
[ Top ] ### method _loadCategory [line 475]
`bool _loadCategory( object &$xAtomObj)`
XPath load of specialized data of element Category. NOTE: Errorhandling is as follows: We set the _failedReason of the passed object and return FALSE. Then let the caller handle the error. #### Tags:
return: | TRUE if OK, FALSE otherwise.
see: | Bs_Ss_XStorage::loadXAtom()
#### Parameters:
object | &$xAtomObj | of element type category
[ Top ] ### method _loadFromCache [line 697]
`bool _loadFromCache( object &$xAtomObj)`
Load parsed XML data *from* a file cache. #### Tags:
return: | TRUE if found, otherwise FALSE
#### Parameters:
object | &$xAtomObj |
[ Top ] ### method _loadProduct [line 227]
`bool _loadProduct( object &$xAtomObj)`
XPath load of specialized data of element Product. NOTE: Errorhandling is as follows: We set the _failedReason of the passed object and return FALSE. Then let the caller handle the error. #### Tags:
return: | TRUE if OK, FALSE otherwise.
see: | Bs_Ss_XStorage::loadXAtom()
#### Parameters:
object | &$xAtomObj | of element type product
[ Top ] ### method _loadShop [line 490]
`bool _loadShop( object &$xAtomObj)`
XPath load of specialized data of the Shop. NOTE: Errorhandling is as follows: We set the _failedReason of the passed object and return FALSE. Then let the caller handle the error. #### Tags:
return: | TRUE if OK, FALSE otherwise.
see: | Bs_Ss_XStorage::loadXAtom()
#### Parameters:
object | &$xAtomObj | of element type SmartShop
[ Top ] ### method _loadToCache [line 735]
`bool _loadToCache( object &$xAtomObj)`
Load parsed XML data *to* a file cache. #### Tags:
return: | TRUE if found, otherwise FALSE
#### Parameters:
object | &$xAtomObj |
[ Top ] Documentation generated on Mon, 29 Dec 2003 21:12:56 +0100 by phpDocumentor 1.2.3