Esempio n. 1
0
 public function __construct($adapter = null)
 {
     if ($adapter == null) {
         $adapter = GlobalAdapterFeature::getStaticAdapter();
     }
     parent::__construct($this->tableName, $adapter);
 }
Esempio n. 2
0
 public function __construct($name = null)
 {
     if ($name) {
         $this->_tableName = $name;
     }
     parent::__construct($this->_tableName, $this->boot()->db);
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 /**
  *
  * @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);
 }
Esempio n. 8
0
 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` )
     )*/
 }
Esempio n. 9
0
 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);
 }
Esempio n. 10
0
 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`)*/
 }
Esempio n. 11
0
 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,*/
 }
Esempio n. 12
0
 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`)
     )*/
 }
Esempio n. 13
0
 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`)
     )*/
 }
Esempio n. 14
0
 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.");
         }
     }
 }
Esempio n. 15
0
 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,*/
 }
Esempio n. 16
0
 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);
 }
Esempio n. 18
0
 public function __construct($adapter)
 {
     parent::__construct($this->tableName, $adapter, new RowGatewayFeature($this->idCol));
 }
Esempio n. 19
0
 public function __construct($adapter)
 {
     parent::__construct($this->tableName, $adapter);
     $this->entityPrototype = new OrderEntity();
     $this->hydrator = new \Zend\Stdlib\Hydrator\Reflection();
 }
Esempio n. 20
0
 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);
 }
Esempio n. 22
0
 public function __construct(Adapter $adapter = null, $databaseSchema = null, ResultSet $selectResultPrototype = null)
 {
     return parent::__construct('ta_usuario', $adapter, $databaseSchema, $selectResultPrototype);
 }
Esempio n. 23
0
 public function __construct($adapter)
 {
     parent::__construct($this->tableName, $adapter, new RowGatewayFeature($this->idCol));
     $this->entityPrototype = new ProductEntity();
     $this->hydrator = new \Zend\Stdlib\Hydrator\Reflection();
 }
Esempio n. 24
0
 public function __construct(Adapter $adapter = null, $databaseSchema = null, ResultSet $selectResultPrototype = null)
 {
     return parent::__construct('sis_w_nota_mantencion', $adapter, $databaseSchema, $selectResultPrototype);
 }
Esempio n. 25
0
 /**
  * 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;
 }
Esempio n. 26
0
 public function __construct(Adapter $adapter, Post $post)
 {
     $this->adapter = $adapter;
     $this->post = $post;
     parent::__construct('forum_posts', $this->adapter);
 }
Esempio n. 27
0
 public function __construct(Adapter $adapter = NULL, $databaseSchema = NULL, ResultSet $selectResultPrototype = NULL)
 {
     return parent::__construct('municipio', $adapter, $databaseSchema, $selectResultPrototype);
 }
Esempio n. 28
0
 public function __construct($table, AdapterInterface $adapter, $features = null)
 {
     $resultSet = new HydratingResultSet(new ObjectPropertyHydrator(), new Entity());
     return parent::__construct($table, $adapter, $features, $resultSet);
 }
Esempio n. 29
0
 public function __construct(Adapter $adapter = null, $databaseSchema = null, ResultSet $selectResultPrototype = null)
 {
     return parent::__construct('sis_m_estacionamiento', $adapter, $databaseSchema, $selectResultPrototype);
 }
Esempio n. 30
0
 /**
  * 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);
 }