Horde_Kolab_Storage_Data_Base::__construct PHP Метод

__construct() публичный Метод

Constructor.
public __construct ( Horde_Kolab_Storage_Folder $folder, Horde_Kolab_Storage_Driver $driver, Horde_Kolab_Storage_Factory $factory, string $type = null, integer $version = 1 )
$folder Horde_Kolab_Storage_Folder The folder to retrieve the data from.
$driver Horde_Kolab_Storage_Driver The primary connection driver.
$factory Horde_Kolab_Storage_Factory The factory.
$type string The type of data we want to access in the folder.
$version integer Format version of the object data.
    public function __construct(Horde_Kolab_Storage_Folder $folder, Horde_Kolab_Storage_Driver $driver, Horde_Kolab_Storage_Factory $factory, $type = null, $version = 1)
    {
        $this->_folder = $folder;
        $this->_driver = $driver;
        $this->_factory = $factory;
        $this->_type = $type;
        $this->_version = $version;
    }

Usage Example

Пример #1
0
 /**
  * Constructor.
  *
  * @param Horde_Kolab_Storage_Folder  $folder   The folder to retrieve the
  *                                              data from.
  * @param Horde_Kolab_Storage_Driver  $driver   The primary connection driver.
  * @param Horde_Kolab_Storage_Factory $factory  The factory.
  * @param Horde_Kolab_Storage_Cache   $cache    The cache storing data for
  *                                              this decorator.
  * @param string                      $type     The type of data we want to
  *                                              access in the folder.
  * @param int                         $version  Format version of the object
  *                                              data.
  */
 public function __construct(Horde_Kolab_Storage_Folder $folder, Horde_Kolab_Storage_Driver $driver, Horde_Kolab_Storage_Factory $factory, Horde_Kolab_Storage_Cache $cache, $type = null, $version = 1)
 {
     parent::__construct($folder, $driver, $factory, $type, $version);
     $this->_data_cache = $cache->getDataCache($this->getIdParameters());
 }