Client
[ class tree: Client ] [ index: Client ] [ all elements ]

Class: ViewUpgrader

Source Location: /client/Views.php

Class Overview


Basis of views upgrade filters


Author(s):

Variables

Methods


Child classes:

OutlineV1ToV2
Upgrades from V1 to V2
OutlineV2ToV3
Upgrades from V2 to V3
LayersV1ToV2
Upgrades from V1 to V2

Class Details

[line 1788]
Basis of views upgrade filters

This class must be extended to define plugin view data filters. Extended classes must be stored in <plugin>/client/ViewsUpgrade.php and named for instance MyPluginV34ToV35. Each filter must be designed to upgrade view data from given version N to version N+1.

This class provides generic filtering methods




Tags:

abstract:  


[ Top ]


Class Variables

$pluginName =

[line 1808]



Tags:

access:  protected

Type:   string


[ Top ]

$sessionData =

[line 1803]



Tags:

access:  protected

Type:   stdClass


[ Top ]

$storage =

[line 1793]



Tags:

access:  protected

Type:   stdClass


[ Top ]

$viewFilter =

[line 1798]



Tags:

access:  protected

Type:   ViewFilter


[ Top ]



Class Methods


constructor __construct [line 1815]

ViewUpgrader __construct( ViewFilter $viewFilter, string $pluginName)

Constructor



Tags:

access:  public


Parameters:

ViewFilter   $viewFilter  
string   $pluginName   plugin name

[ Top ]

method add [line 1866]

void add( string $to, mixed $value)

Adds a new property.



Tags:

access:  protected


Parameters:

string   $to   new property name
mixed   $value   value of new property

[ Top ]

method callFilters [line 1851]

void callFilters( )

Executes upgrade filters. To be redefined in extended filters.



Tags:

access:  protected
abstract:  


Overridden in child classes as:

OutlineV1ToV2::callFilters()
OutlineV2ToV3::callFilters()
LayersV1ToV2::callFilters()

[ Top ]

method getDefaultSessionData [line 1824]

ClientSession getDefaultSessionData( )

Retrieves default session data.



Tags:

access:  protected


[ Top ]

method getFromDefaultSession [line 1892]

mixed getFromDefaultSession( string $dataname)

Retrieves some data in cached default session



Tags:

return:  retrieved data
access:  protected


Parameters:

string   $dataname   name of data to retrieve

[ Top ]

method remove [line 1857]

void remove( string $from)

Removes given property.



Tags:

access:  protected


Parameters:

string   $from   property name

[ Top ]

method rename [line 1879]

void rename( string $from, string $to)

Updates name of property.



Tags:

access:  protected


Parameters:

string   $from   old name
string   $to   new name

[ Top ]

method upgrade [line 1837]

bool upgrade( stdclass &$storage)

Upgrades given plugin storage.



Tags:

return:  true if success
access:  public


Parameters:

stdclass   &$storage   plugin storage to upgrade

[ Top ]


Documentation generated on Mon, 09 Sep 2013 13:31:26 +0200 by phpDocumentor 1.3.0RC3