Client

# Class: ViewFilter Source Location: /client/Views.php
### Class Overview
Views writing/reading filters | ### Variables $cartoclient $defaultSession $log $pluginsVersions | ### Methods __construct checkVersion decapsulate encapsulate getDefaultData getFilterFilePath getFiltersSequence getPluginName getRecorderVersion upgrade
### Child classes: ViewConverter Views writing/reading filters
### Class Details [line 546] Views writing/reading filters [ Top ] ### Class Variables #### $cartoclient = [line 556] #### Tags:
access: | private
Type: | Cartoclient
[ Top ] #### $defaultSession = [line 566] #### Tags:
access: | private
Type: | stdClass
[ Top ] #### $log = [line 551] #### Tags:
access: | private
Type: | Logger
[ Top ] #### $pluginsVersions = array() [line 561] #### Tags:
access: | private
Type: | array
[ Top ] ### Class Methods ### constructor __construct [line 572]
`ViewFilter __construct( Cartoclient $cartoclient)`
Constructor #### Tags:
access: | public
#### Parameters:
Cartoclient | $cartoclient |
[ Top ] ### method checkVersion [line 650]
`stdClass checkVersion( stdClass $data, int $viewId)`
Checks that view format is not outdated. If yes, tries to "repair". #### Tags:
access: | public
#### Parameters:
stdClass | $data |
int | $viewId | view id
[ Top ] ### method decapsulate [line 632]
`stdClass decapsulate( string $viewXml)`
Extracts view data from its XML storage. #### Tags:
access: | public
#### Parameters:
string | $viewXml | view in XML format
[ Top ] ### method encapsulate [line 610]
`string encapsulate( stdClass $sessionData)`
Encapsulates view data within an XML document. #### Tags:
access: | public
#### Parameters:
stdClass | $sessionData |
[ Top ] ### method getDefaultData [line 746]
`mixed getDefaultData( [string $storage = ''])`
Returns cached session plugin storage. #### Tags:
access: | public
#### Parameters:
string | $storage | plugin name, if empty method will return full storage
[ Top ] ### method getFilterFilePath [line 698]
`string getFilterFilePath( string $pluginName)`
Returns path of plugin view filters file. #### Tags:
return: | filter filepath, empty if no file found
access: | private
#### Parameters:
string | $pluginName | plugin name
[ Top ] ### method getFiltersSequence [line 724]
`array getFiltersSequence( string $pluginName, int $initialVersion, int $finalVersion)`
Detects sequence of filters needed to upgrade data. #### Tags:
return: | empty if detection failed
access: | private
#### Parameters:
string | $pluginName | plugin name
int | $initialVersion | initial version
int | $finalVersion | final version
[ Top ] ### method getPluginName [line 583]
`string getPluginName( string $pluginName, [bool $uppercase = false])`
Returns plugin base name. #### Tags:
access: | private
#### Parameters:
string | $pluginName |
bool | $uppercase | if true, result is uppercased
[ Top ] ### method getRecorderVersion [line 598]
`int getRecorderVersion( string $pluginName)`
Returns current version of given plugin session container. #### Tags:
access: | public
Overridden in child classes as: ViewConverter::getRecorderVersion() #### Parameters:
string | $pluginName | client plugin name.
[ Top ] ### method upgrade [line 774]
`bool upgrade( string $pluginName, string &$pluginVal, int $initialVersion, int $finalVersion)`
Tries to upgrade view data format. WARNING: only works with object formats! #### Tags:
return: | true if success
access: | private
#### Parameters:
string | $pluginName | plugin classname
string | &$pluginVal | serialized plugin view data
int | $initialVersion | initial version
int | $finalVersion | final version
[ Top ] Documentation generated on Fri, 21 Sep 2007 13:31:11 +0200 by phpDocumentor 1.3.0RC3