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