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