예제 #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
 /**
  * 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);
 }