Each container rule type is a Recite CMS driver that lives in the
./lib/drivers/containers/rule
directory.
The driver file is a PHP class with the filename controller.php
which extends from the Module_Containers_Driver_Abstract
class.
The class in this file must follow standard Recite CMS driver naming conventions. For
example, if your driver is called weather, your
controller.php
file would have the path
./lib/drivers/containers/rule/
. weather
/controller.php
In this example, the file would define a single class called
Driver_containers_rule_
weather
_controller
There are a number of methods you must implement to create your container rule,
each of which is covered in this guide. One of these methods is the __toString()
, which
must return a brief description of what the container rule driver does.
Example 2.1. A sample container (controller.php
)
<?php class Driver_containers_rule_weather_controller extends Module_Containers_Driver_Abstract { public function __toString() { return 'Display the latest weather'; } /* other code will go here */ } ?>