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


PHP Group::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Class constructor.
  * 
  * @param array $options  Element options
  * @param array $attr     HTML attributes
  */
 public function __construct(array $options = [], array $attr = [])
 {
     if (isset($options['method'])) {
         $attr['method'] = $options['method'];
     }
     $attr += ['method' => 'post'];
     if (isset($options['action'])) {
         $attr['action'] = $options['action'];
     }
     unset($options['method'], $options['action']);
     parent::__construct($options, $attr);
 }
开发者ID:sachsy,项目名称:formbuilder,代码行数:18,代码来源:Form.php

示例2: __construct

 /**
  *
  * Class constructor
  *
  * @param string $name
  *
  * @access public
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setRepeating(true);
     $this->setSortable(true);
     $this->setLabel(Translate::translate('Gallery'));
     $name = new Text('name');
     $name->setLabel(Translate::translate('Name'));
     $this->addControl($name);
     $values = new Textarea('values');
     $values->setLabel(Translate::translate('Description'));
     $this->addControl($values);
 }
开发者ID:silversite,项目名称:silverwp,代码行数:21,代码来源:Features.php

示例3: __construct

 /**
  * @param string[] $fieldNames An array of field names
  * @param string|string[] $words An array of words or a string of whitespace or comma separated words
  */
 public function __construct($fieldNames, $words)
 {
     $this->fieldNames = $fieldNames;
     $this->words = $words;
     if (!is_array($words)) {
         $words = preg_split('/[\\s,]+/', $words);
     }
     $groups = [];
     foreach ($words as $word) {
         $filters = [];
         foreach ($fieldNames as $fieldName) {
             $filters[] = new Contains($fieldName, $word);
         }
         $groups[] = new OrGroup($filters);
     }
     parent::__construct("AND", $groups);
 }
开发者ID:samnotsowise,项目名称:Module.Stem,代码行数:21,代码来源:AllWordsGroup.php

示例4: __construct

 public function __construct($group = null)
 {
     parent::__construct($group);
 }
开发者ID:boxtar,项目名称:prototype,代码行数:4,代码来源:Comedy_Group.php

示例5: __construct

 /**
  * Class constructor.
  * 
  * @param array  $options  Element options
  * @param array  $attr     HTML attributes
  */
 public function __construct(array $options = [], array $attr = [])
 {
     parent::__construct($options, $attr);
 }
开发者ID:sachsy,项目名称:formbuilder,代码行数:10,代码来源:Fieldset.php

示例6: __construct

 public function __construct()
 {
     parent::__construct(0, null);
 }
开发者ID:hugutux,项目名称:booked,代码行数:4,代码来源:Group.php

示例7: __construct

 public function __construct($id = '', $name)
 {
     parent::__construct($id);
     $this->name = $name;
 }
开发者ID:tarcisio,项目名称:svg,代码行数:5,代码来源:Layer.php

示例8: __construct

 /**
  * Class constructor.
  * @param obj   $db             PDO object
  * @param int   $sessionToken   an integer saved in $_SESSION to keep the user logged in
  */
 public function __construct($db, $sessionToken, $characterID)
 {
     /** Adding in the db object to the class */
     $this->_db = $db;
     if ($sessionToken !== null) {
         /** Looking up the sessionToken within our core_sessions table */
         $stmt_lookup_session_token = $db->prepare('SELECT session_token,userid,expiration_time FROM core_sessions ' . ' WHERE session_token = ? ORDER BY expiration_time DESC LIMIT 1');
         $stmt_lookup_session_token->execute(array($sessionToken));
         $session_information = $stmt_lookup_session_token->fetch(\PDO::FETCH_ASSOC);
         /** Verifying if we have a session currently active, and it is within our session timer */
         if ($stmt_lookup_session_token->rowCount() == 1 && time() - $session_information['expiration_time'] <= SESSION_TIME_LIMIT) {
             /** Looking up the user account related to this sessionToken */
             $stmt = $db->prepare('SELECT userid,username,access_level,group_id FROM user_accounts WHERE userid = ? LIMIT 1');
             $stmt->execute(array($session_information['userid']));
             $account_information = $stmt->fetch(\PDO::FETCH_ASSOC);
             /** Saving the pertinent account information to the User class object */
             $this->_userID = $account_information['userid'];
             $this->_username = $account_information['username'];
             $this->_accessLevel = $account_information['access_level'];
             parent::__construct($account_information['group_id']);
             /** Getting the SSO Character information */
             $stmt_sso_character_lookup = $db->prepare('SELECT character_id,corporation_id,alliance_id,key_keyid FROM  ' . 'user_characters WHERE userid = ? AND character_id = ? AND sso_character = 1');
             $stmt_sso_character_lookup->execute(array($this->_userID, $characterID));
             $ssoCharacterInformation = $stmt_sso_character_lookup->fetch(\PDO::FETCH_ASSOC);
             $this->_characterID = $ssoCharacterInformation['character_id'];
             $this->_corporationID = $ssoCharacterInformation['corporation_id'];
             $this->_allianceID = $ssoCharacterInformation['alliance_id'];
             /** Setting our login status to TRUE */
             $this->_loginStatus = true;
         } else {
             $this->_loginStatus = false;
         }
     } else {
         $this->_loginStatus = false;
     }
 }
开发者ID:jgrancell,项目名称:blackbriar,代码行数:41,代码来源:user.inc.php

示例9: __construct

 public function __construct($filters = [])
 {
     parent::__construct("OR", $filters);
 }
开发者ID:samnotsowise,项目名称:Module.Stem,代码行数:4,代码来源:OrGroup.php

示例10: __construct

 /**
  * Creates a new GroupProfile object.
  * 
  * @see Group::__construct()
  */
 public function __construct($groupID = null, $row = null, $groupname = null, $email = null, $sqlSelects = '', $sqlJoins = '')
 {
     $this->avatarID = 0;
     parent::__construct($groupID, $row, $groupname, $email);
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:10,代码来源:ContestGroupProfile.class.php

示例11: __construct

 /**
  * Constructor.
  *
  * @param string                              $documentClass The document class.
  * @param \Mandango\Document\AbstractDocument $parent The parent document.
  * @param string                              $field  The reference field.
  *
  * @api
  */
 public function __construct($documentClass, $parent, $field)
 {
     parent::__construct($documentClass);
     $this->parent = $parent;
     $this->field = $field;
 }
开发者ID:netom,项目名称:mandango,代码行数:15,代码来源:ReferenceGroup.php

示例12: __construct

 /**
  * The instance is constructed with the following defaults:
  *
  * - {@link COLUMNS}: 3.
  * - {@link COLUMNS_TOTAL}: 12.
  *
  * @param array $attribute
  */
 public function __construct(array $attribute = [])
 {
     parent::__construct($attribute + [self::COLUMNS => 3, self::COLUMNS_TOTAL => 12]);
 }
开发者ID:brickrouge,项目名称:brickrouge,代码行数:12,代码来源:ColumnedGroup.php

示例13: __construct

 public function __construct($columnName, $min, $max)
 {
     $this->min = $min;
     $this->max = $max;
     parent::__construct("And", [new GreaterThan($columnName, $min, true), new LessThan($columnName, $max, true)]);
 }
开发者ID:samnotsowise,项目名称:Module.Stem,代码行数:6,代码来源:Between.php


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