コード例 #1
0
ファイル: File.php プロジェクト: kirvin/the-nerdery
 /**
  * constructor
  *
  * @param array $options    an array of plugin options
  */
 public function __construct(array $options = array())
 {
     parent::__construct($options);
     if (!isset($this->_options['resource'])) {
         $table = new Doctrine_Table('File', Doctrine_Manager::connection());
         $table->setColumn('url', 'string', 255, array('primary' => true));
     }
     if (empty($this->_options['fields'])) {
         $this->_options['fields'] = array('url', 'content');
     }
     $this->initialize($table);
 }
コード例 #2
0
ファイル: File.php プロジェクト: atikahmed/joomla-probid
 /**
  * constructor
  *
  * @param array $options    an array of plugin options
  */
 public function __construct(array $options = array())
 {
     parent::__construct($options);
     if (!isset($this->_options['resource'])) {
         $conn = Doctrine_Manager::connection();
         $tableClass = $conn->getAttribute(Doctrine_Core::ATTR_TABLE_CLASS);
         $table = new $tableClass('File', $conn);
         $table->setColumn('url', 'string', 255, array('primary' => true));
     }
     if (empty($this->_options['fields'])) {
         $this->_options['fields'] = array('url', 'content');
     }
     $this->initialize($table);
 }