public function __construct($adapter = null) { if ($adapter == null) { $adapter = GlobalAdapterFeature::getStaticAdapter(); } parent::__construct($this->tableName, $adapter); }
public function __construct($name = null) { if ($name) { $this->_tableName = $name; } parent::__construct($this->_tableName, $this->boot()->db); }
public function __construct(DBEntity $object, AdapterInterface $adapter, $features = null) { $this->object = $object; $resultSetPrototype = new ResultSet(); $resultSetPrototype->setArrayObjectPrototype($object); parent::__construct($object->getTableName(), $adapter, $features, $resultSetPrototype); }
/** * * @param AdapterInterface $adapter * @param EntityInterface $entity */ public function __construct(AdapterInterface $adapter, EntityInterface $entity) { $hydrator = new \Zend\Stdlib\Hydrator\ClassMethods(); $resultSet = new ResultSet($hydrator, $entity); $this->entityPrototype = $entity; parent::__construct($this->getTableName(), $adapter, null, $resultSet); }
/** * @param AdapterInterface $adapter * @param CommonEntity $entity */ public function __construct($adapter, $entity) { parent::__construct($this->tableName, $adapter); $this->hydrator = new Reflection(); $this->entityPrototype = $entity; $this->adapter = $adapter; }
/** * Constructor * * @param AclProvider $acl * @param string $table * @param AdapterInterface $adapter * @param Feature\AbstractFeature|Feature\FeatureSet|Feature\AbstractFeature[] $features * @param ResultSetInterface $resultSetPrototype * @param Sql $sql * @throws Exception\InvalidArgumentException */ public function __construct(Acl $acl, $table, AdapterInterface $adapter, $features = null, ResultSetInterface $resultSetPrototype = null, Sql $sql = null, $primaryKeyName = null) { $this->acl = $acl; if ($features !== null) { if ($features instanceof Feature\AbstractFeature) { $features = array($features); } if (is_array($features)) { $this->featureSet = new Feature\FeatureSet($features); } elseif ($features instanceof Feature\FeatureSet) { $this->featureSet = $features; } else { throw new Exception\InvalidArgumentException('TableGateway expects $feature to be an instance of an AbstractFeature or a FeatureSet, or an array of AbstractFeatures'); } } else { $this->featureSet = new Feature\FeatureSet(); } if ($primaryKeyName !== null) { $this->primaryKeyFieldName = $primaryKeyName; } $rowGatewayPrototype = new AclAwareRowGateway($acl, $this->primaryKeyFieldName, $table, $adapter); $rowGatewayFeature = new RowGatewayFeature($rowGatewayPrototype); $this->featureSet->addFeature($rowGatewayFeature); $this->memcache = new MemcacheProvider(); parent::__construct($table, $adapter, $this->featureSet, $resultSetPrototype, $sql); }
/** * Constructor * * @param string $tableName * @param Adapter $masterAdapter * @param Adapter $slaveAdapter * @param type $databaseSchema * @param ResultSet $selectResultPrototype */ public function __construct($tableName, Adapter $masterAdapter, Adapter $slaveAdapter, $databaseSchema = null, ResultSet $selectResultPrototype = null) { $this->masterAdapter = $masterAdapter; $this->slaveAdapter = $slaveAdapter; // initialize adapter to masterAdapter parent::__construct($tableName, $masterAdapter, $databaseSchema, $selectResultPrototype); }
public function __construct($adapter) { parent::__construct($this->tableName, $adapter, new RowGatewayFeature($this->idCol)); /* CREATE TABLE IF NOT EXISTS `t_pictures` ( `id` int( 11 ) NOT NULL AUTO_INCREMENT , `url_picture` varchar( 255 ) NOT NULL , PRIMARY KEY ( `id` ) )*/ }
public function __construct($table, Adapter $db, $strategies = array()) { $hydrator = new ArraySerializable(); foreach ($strategies as $field => $strategy) { $hydrator->addStrategy($field, $strategy); } $resultSet = new HydratingResultSet(); $resultSet->setHydrator($hydrator); parent::__construct($table, $db, null, $resultSet); }
public function __construct($adapter) { parent::__construct($this->tableName, $adapter, new RowGatewayFeature($this->idCol)); /* `t_article` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title_article` varchar(255) NOT NULL, `short_article` text NOT NULL, `full_article` text NOT NULL, PRIMARY KEY (`id`)*/ }
public function __construct($adapter) { parent::__construct($this->tableName, $adapter, new RowGatewayFeature($this->idCol)); /* `id` int(11) NOT NULL AUTO_INCREMENT, `id_group` int(11) NOT NULL, `number_folio` varchar(255) NOT NULL, `name_folio` varchar(255) NOT NULL, `describe_folio` text NOT NULL, `id_testimonials` int(11) NOT NULL, `price_folio` int(11) NOT NULL,*/ }
public function __construct($adapter) { parent::__construct($this->tableName, $adapter, new RowGatewayFeature($this->idCol)); /*t_illustrates` ( `id` int(11) NOT NULL AUTO_INCREMENT, `url_illustrates` varchar(255) NOT NULL, `id_article` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `id_article` (`id_article`) )*/ }
public function __construct($adapter) { parent::__construct($this->tableName, $adapter, new RowGatewayFeature($this->idCol)); /*`t_calc_sess` ( `id` int(11) NOT NULL AUTO_INCREMENT, `calc_sess` varchar(255) NOT NULL, `calc_date` date NOT NULL, `calc_data` text, PRIMARY KEY (`id`), UNIQUE KEY `calc_sess` (`calc_sess`) )*/ }
public function __construct(AdapterInterface $adapter = null, $features = null, ResultSetInterface $resultSetPrototype = null, Sql $sql = null) { if ($adapter instanceof Adapter) { parent::__construct($this->table, $adapter, $features, $resultSetPrototype, $sql); } else { $adapter = Registry::get('db'); if ($adapter instanceof Adapter) { parent::__construct($this->table, $adapter); } else { throw new Exception("Need an Zend\\Db\\Adapter object."); } } }
public function __construct($adapter) { parent::__construct($this->tableName, $adapter, new RowGatewayFeature($this->idCol)); //$testimonialsSrv = $this -> getServiceLocator()->get('testimonials'); /*`t_testimonials` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name_testimonials` varchar(255) NOT NULL, `organization` varchar(255) NOT NULL, `id_picture` int(11) NOT NULL, `text_testimonials` text NOT NULL, `short_text_testimonials` text NOT NULL, `public_on_home_testimonials` tinyint(4) NOT NULL,*/ }
public function __construct(Adapter $adapter = null, $databaseSchema = null, ResultSet $selectResultPrototype = null) { return parent::__construct('sis_m_plan_emergencia', $adapter, $databaseSchema, $selectResultPrototype); }
/** * Constructor * * @param AdapterInterface $adapter * * @throws Exception\InvalidArgumentException */ public function __construct(AdapterInterface $adapter) { $resultSetPrototype = new HydratingResultSet(new CustomerHydrator(), new CustomerEntity()); parent::__construct('customers', $adapter, null, $resultSetPrototype); }
public function __construct($adapter) { parent::__construct($this->tableName, $adapter, new RowGatewayFeature($this->idCol)); }
public function __construct($adapter) { parent::__construct($this->tableName, $adapter); $this->entityPrototype = new OrderEntity(); $this->hydrator = new \Zend\Stdlib\Hydrator\Reflection(); }
public function __construct() { $configArray = array('driver' => 'Mysqli', 'database' => 'development', 'username' => 'developer', 'password' => 'developer', 'options' => array('buffer_results' => true)); $adapter = new Zend\Db\Adapter\Adapter($configArray); parent::__construct('users', $adapter); }
public function __construct(Adapter $adapter, $features = null, \Zend\Db\ResultSet\ResultSetInterface $resultSetPrototype = null, \Zend\Db\Sql\Sql $sql = null) { parent::__construct('prueba_grafica', $adapter, $features, $resultSetPrototype, $sql); }
public function __construct(Adapter $adapter = null, $databaseSchema = null, ResultSet $selectResultPrototype = null) { return parent::__construct('ta_usuario', $adapter, $databaseSchema, $selectResultPrototype); }
public function __construct($adapter) { parent::__construct($this->tableName, $adapter, new RowGatewayFeature($this->idCol)); $this->entityPrototype = new ProductEntity(); $this->hydrator = new \Zend\Stdlib\Hydrator\Reflection(); }
public function __construct(Adapter $adapter = null, $databaseSchema = null, ResultSet $selectResultPrototype = null) { return parent::__construct('sis_w_nota_mantencion', $adapter, $databaseSchema, $selectResultPrototype); }
/** * Constructor * * @param Zend\Db\Adapter\Adapter $adapter * @param Core\Service\LazyLoader\Acl $aclLazyLoader * @param Zend\ServiceManager\ServiceLocatorInterface $serviceLocator */ public function __construct(Adapter $adapter, LazyLoader\Acl $aclLazyLoader, ServiceLocatorInterface $serviceLocator) { parent::__construct($this->table, $adapter); $this->aclLazyLoader = $aclLazyLoader; $this->serviceLocator = $serviceLocator; }
public function __construct(Adapter $adapter, Post $post) { $this->adapter = $adapter; $this->post = $post; parent::__construct('forum_posts', $this->adapter); }
public function __construct(Adapter $adapter = NULL, $databaseSchema = NULL, ResultSet $selectResultPrototype = NULL) { return parent::__construct('municipio', $adapter, $databaseSchema, $selectResultPrototype); }
public function __construct($table, AdapterInterface $adapter, $features = null) { $resultSet = new HydratingResultSet(new ObjectPropertyHydrator(), new Entity()); return parent::__construct($table, $adapter, $features, $resultSet); }
public function __construct(Adapter $adapter = null, $databaseSchema = null, ResultSet $selectResultPrototype = null) { return parent::__construct('sis_m_estacionamiento', $adapter, $databaseSchema, $selectResultPrototype); }
/** * Constructor * * @param string $table * @param string $databaseSchema * @param ResultSet $selectResultPrototype */ public function __construct($table, $databaseSchema = null, ResultSet $selectResultPrototype = null) { $adapter = static::getStaticAdapter(); parent::__construct($table, $adapter, $databaseSchema, $selectResultPrototype); }