當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。