Download "user manual"
Transcript
Upgrading Views Data
define your own transformers methods. Details about basic methods are given in
ViewUpgrader class documentation (CartoWeb API manual). At least an upgrade
filter class must redefine the callFilters() method that indicates the sequence of
transformations to apply.
An example of filters might be:
<?php
/**
* coreplugins/location/client/ViewsUpgrade.php
*/
class test {
var $game = 'arkanoid';
var $i = 12;
}
/**
* Upgrades from V1 to V2
*/
class LocationV1ToV2 extends ViewUpgrader {
protected function callFilters() {
$this->add('test', 'toto');
}
}
/**
* Upgrades from V2 to V3
*/
class LocationV2ToV3 extends ViewUpgrader {
protected function callFilters() {
$this->rename('test', 'foo');
$this->add('bar', new test);
$this->add('someProperty', 2);
$this->add('caramba', 'ole');
$this->remove('someProperty');
}
}
?>
Warning
It is the responsibility of each developer to provide adapted filters when he/she
updates plugin session containers!
Warning
Upgrade filters do not support non object-typed plugin session containers.
11.2.3. Upgrade Configuration
See Section 13.2.2, “Main Views Controller”. Only two of these parameters are
related to views upgrading. viewLogErrors enables to log outdated views loadings
whereas viewUpgradeOutdated is useful to activate or not the upgrading device (if
249