当前位置: 首页>>代码示例>>PHP>>正文


PHP TableGateway::__construct方法代码示例

本文整理汇总了PHP中Zend\Db\TableGateway\TableGateway::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP TableGateway::__construct方法的具体用法?PHP TableGateway::__construct怎么用?PHP TableGateway::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend\Db\TableGateway\TableGateway的用法示例。


在下文中一共展示了TableGateway::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($adapter = null)
 {
     if ($adapter == null) {
         $adapter = GlobalAdapterFeature::getStaticAdapter();
     }
     parent::__construct($this->tableName, $adapter);
 }
开发者ID:jonathan1212,项目名称:zf2,代码行数:7,代码来源:TableModel.php

示例2: __construct

 public function __construct($name = null)
 {
     if ($name) {
         $this->_tableName = $name;
     }
     parent::__construct($this->_tableName, $this->boot()->db);
 }
开发者ID:rostmefpoter,项目名称:bh,代码行数:7,代码来源:~Table.php

示例3: __construct

 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);
 }
开发者ID:rodrigogk87,项目名称:djme,代码行数:7,代码来源:DJMeTableGateway.php

示例4: __construct

 /**
  *
  * @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);
 }
开发者ID:nouron,项目名称:nouron,代码行数:12,代码来源:AbstractTable.php

示例5: __construct

 /**
  * @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;
 }
开发者ID:jiromm,项目名称:zf3-skeleton-application,代码行数:11,代码来源:CommonTableGateway.php

示例6: __construct

 /**
  * 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);
 }
开发者ID:rudderdon,项目名称:Directus,代码行数:37,代码来源:AclAwareTableGateway.php

示例7: __construct

 /**
  * 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);
 }
开发者ID:bradley-holt,项目名称:zf2,代码行数:16,代码来源:MasterSlaveTableGateway.php

示例8: __construct

 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` )
     )*/
 }
开发者ID:vikitina,项目名称:ekalan,代码行数:9,代码来源:Pictures.php

示例9: __construct

 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);
 }
开发者ID:xangxiong,项目名称:rest-example,代码行数:10,代码来源:Base.php

示例10: __construct

 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`)*/
 }
开发者ID:vikitina,项目名称:ekalan,代码行数:10,代码来源:Article.php

示例11: __construct

 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,*/
 }
开发者ID:vikitina,项目名称:ekalan,代码行数:11,代码来源:Folio.php

示例12: __construct

 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`)
     )*/
 }
开发者ID:vikitina,项目名称:ekalan,代码行数:11,代码来源:Illustrates.php

示例13: __construct

 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`)
     )*/
 }
开发者ID:vikitina,项目名称:ekalan,代码行数:12,代码来源:Calcsess.php

示例14: __construct

 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.");
         }
     }
 }
开发者ID:vfeelit,项目名称:YZend,代码行数:13,代码来源:Platform.php

示例15: __construct

 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,*/
 }
开发者ID:vikitina,项目名称:ekalan,代码行数:13,代码来源:Testimonials.php


注:本文中的Zend\Db\TableGateway\TableGateway::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。