示例#1
0
文件: AddThis.php 项目: gotcms/gotcms
 /**
  * Constructor
  *
  * @param CoreConfig $configTable Config table
  */
 public function __construct(CoreConfig $configTable = null)
 {
     if ($configTable === null) {
         throw new Exception('Invalid parameter, $config must be an instance of \\Gc\\Core\\Config');
     }
     $this->configTable = $configTable;
     $config = @unserialize($this->configTable->getValue('module_addthis'));
     $this->config = array_merge($this->defaultOptions, $config ? $config : array());
     parent::__construct();
 }
示例#2
0
 /**
  * Set/Get attribute wrapper
  *
  * @param string $method Method
  * @param array  $args   Args
  *
  * @return  \Zend\Db\TableGateway\TableGateway
  */
 public function __call($method, $args)
 {
     if (empty(self::$tables[$this->name])) {
         $this->__construct();
     }
     if (method_exists(self::$tables[$this->name], $method)) {
         return call_user_func_array(array(self::$tables[$this->name], $method), $args);
     }
     return parent::__call($method, $args);
 }
示例#3
0
 /**
  * Abstract function for save Editor
  *
  * @param Datatype\AbstractDatatype $datatypeAbstract Datatype
  */
 public function __construct(Datatype\AbstractDatatype $datatypeAbstract)
 {
     $this->datatype = $datatypeAbstract;
     $this->property = $datatypeAbstract->getProperty();
     parent::__construct();
 }
示例#4
0
 /**
  * Abstract function for save Editor
  *
  * @param Datatype\AbstractDatatype $datatypeAbstract Datatype
  */
 public function __construct(Datatype\AbstractDatatype $datatypeAbstract)
 {
     $this->datatype = $datatypeAbstract;
     parent::__construct();
 }
示例#5
0
 /**
  * Test
  *
  * @return void
  */
 public function testOffsetGet()
 {
     $this->object->setData('k', 'v');
     $this->assertEquals('v', $this->object->offsetGet('k'));
 }