本文整理汇总了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);
}
示例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);
}
示例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);
}
示例4: __construct
public function __construct($group = null)
{
parent::__construct($group);
}
示例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);
}
示例6: __construct
public function __construct()
{
parent::__construct(0, null);
}
示例7: __construct
public function __construct($id = '', $name)
{
parent::__construct($id);
$this->name = $name;
}
示例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;
}
}
示例9: __construct
public function __construct($filters = [])
{
parent::__construct("OR", $filters);
}
示例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);
}
示例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;
}
示例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]);
}
示例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)]);
}