本文整理汇总了PHP中Filter::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Filter::__construct方法的具体用法?PHP Filter::__construct怎么用?PHP Filter::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Filter
的用法示例。
在下文中一共展示了Filter::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor.
*
* @param string $leagueId
*/
public function __construct($leagueId = null)
{
parent::__construct();
if ($leagueId !== null) {
$this->setLeagueId($leagueId);
}
}
示例2: __construct
/**
* @param Grido\Grid $grid
* @param string $name
* @param string $label
* @param array $items for select
*/
public function __construct($grid, $name, $label, array $items = NULL)
{
parent::__construct($grid, $name, $label);
if ($items !== NULL) {
$this->getControl()->setItems($items);
}
}
示例3: __construct
public function __construct()
{
$allOperators = implode(",", array(self::OPERATORS, self::SPATIAL_OPERATORS));
if (func_num_args() >= 3) {
$this->operator = func_get_arg(0);
$this->key = func_get_arg(1);
$this->value = func_get_arg(2);
if (func_num_args() >= 4) {
$this->wfsConf = func_get_arg(3);
if (!is_a($this->wfsConf, "WfsConfiguration")) {
throw new Exception("OgcFilter: wfsConf is not a WFS Configuration.");
}
}
if (!in_array($this->operator, explode(",", $allOperators))) {
throw new Exception("OgcFilter: Invalid operator " . $this->operator);
}
} else {
if (func_num_args() === 2) {
$logicalOp = func_get_arg(0);
$filterArray = func_get_arg(1);
return parent::__construct($logicalOp, $filterArray);
} else {
throw new Exception("OgcFilter: Insufficient arguments.");
}
}
}
示例4:
function __construct()
{
// HHVM (PHP 5 mode, PHP 7 mode), PHP 5, 7: Filter::filter is called;
// no error
// PHP 8: "Fatal error: Cannot call constructor"
parent::__construct();
}
示例5: __construct
public function __construct($primaryTable, $primaryTableAlias, $primaryJoinField)
{
parent::__construct();
$this->primaryTable = $primaryTable;
$this->primaryTableAlias = $primaryTableAlias;
$this->primaryJoinField = new Field($primaryJoinField, $primaryTableAlias);
}
示例6: __construct
/**
* Constructor
*
* @param callable $callback
* @return void
*/
public function __construct($callback)
{
parent::__construct($callback);
// Set the default signature
$this->resetParameters();
$this->addParameterByName('attrValue');
}
示例7: __construct
/**
* Build a new instance of the validator
*
* @param string $message Message returned on validation error
* @return void
*/
public function __construct($options = null, $message = "The field must be a valid URL.")
{
parent::__construct($message);
$this->filterFlag = FILTER_VALIDATE_URL;
if ($options) {
$this->filterOptions = $options;
}
}
示例8: __construct
public function __construct($only_enabled_users = true)
{
parent::__construct();
$this->qb->select(new Field("id", "users"))->from(Tbl::get('TBL_USERS', 'UserManagement'), "users");
if ($only_enabled_users) {
$this->qb->andWhere($this->qb->expr()->equal(new Field('enable', "users"), UserManagement::STATE_ENABLE_ENABLED));
}
}
示例9: __construct
/**
* Constructor
*
* @param int $broadcasterSteamId
* @param int $leagueId
*/
public function __construct($broadcasterSteamId, $leagueId = null)
{
parent::__construct();
$this->setBroadcasterSteamId($broadcasterSteamId);
if ($leagueId !== null) {
$this->setLeagueId($leagueId);
}
}
示例10: __construct
public function __construct($params = array())
{
parent::__construct($params);
$this->valueName = isset($params['valueName']) ? $params['valueName'] : '';
if ($this->valueName == '') {
throw new Exception('Missing or empty valueName parameter');
}
$this->convertZeroToNULL = isset($params['convertZeroToNULL']) ? (bool) $params['convertZeroToNULL'] : false;
}
示例11: __construct
/**
* @param string $baseUrl The URL for this item, WITHOUT the actual filter
* parameter. This will be appended programmatically.
* @param string $fieldName
* @param float $absoluteMinimum
* @param float $absoluteMaximum
* @param float $selectedMinimum
* @param float $selectedMaximum
*/
public function __construct($baseUrl, $fieldName, $absoluteMinimum = 0, $absoluteMaximum = 0, $selectedMinimum = 0, $selectedMaximum = 0)
{
$selected = $selectedMinimum != $absoluteMinimum || $selectedMaximum != $absoluteMaximum;
parent::__construct('', $baseUrl, $selected, $fieldName);
$this->absoluteMinimum = $absoluteMinimum;
$this->absoluteMaximum = $absoluteMaximum;
$this->selectedMinimum = $selectedMinimum;
$this->selectedMaximum = $selectedMaximum;
}
示例12: __construct
public function __construct($headersOnly = true)
{
parent::__construct();
if ($headersOnly) {
$this->qb->select(new Field("*"));
} else {
$this->qb->select(array(new Field('id', 'main'), new Field('subject', 'main'), new Field('date', 'main'), new Field('sender', 'extra'), new Field('read', 'extra'), new Field('trashed', 'extra'), new Field('deleted', 'extra')));
}
$this->qb->from(Tbl::get('TBL_MESSAGES', 'MessageManagement'), "main")->leftJoin(Tbl::get('TBL_EXTRA', 'MessageManagement'), "extra", $this->qb->expr()->equal(new Field('id', 'main'), new Field('message_id', 'extra')));
}
示例13: __construct
/**
* Constructor.
*
* @param string|int|null $start
* @param int|null $limit
*/
public function __construct($start = null, $limit = null)
{
parent::__construct();
if ($start !== null) {
$this->setStartSequenceNumber($start);
}
if ($limit !== null) {
$this->setLimit($limit);
}
}
示例14: assert
/**
* Constructor
*
* NB: Sub-classes of this class must not add additional
* mandatory constructor arguments. Sub-classes that implement
* additional optional constructor arguments must make these
* also accessible via setters if they are required to fully
* parameterize the transformation. Filter parameters must be
* stored as data in the underlying DataObject.
*
* This is necessary as the FilterDAO does not support
* constructor configuration. Filter parameters will be
* configured via DataObject::setData(). Only parameters
* that are available in the DataObject will be persisted.
*
* @param $filterGroup FilterGroup
*/
function __construct($filterGroup)
{
// Check and set the filter group.
assert(is_a($filterGroup, 'FilterGroup'));
$this->_filterGroup = $filterGroup;
// Initialize the filter.
$this->setParentFilterId(0);
$this->setIsTemplate(false);
parent::__construct($filterGroup->getInputType(), $filterGroup->getOutputType());
}
示例15: __construct
/**
* Build a new instance of the validator
*
* @param bool $IPv4 Filter only IPv4 addresses
* @param bool $IPv6 Filter only IPv6 addresses
* @param bool $no_priv_range Address not in private range
* @param string $message Message returned on validation error
* @return void
*/
public function __construct($IPv4 = true, $IPv6 = false, $no_priv_range = false, $message = "The field must be a valid IP Address.")
{
parent::__construct($message);
$this->filterFlag = FILTER_VALIDATE_IP;
if ($IPv4) {
$this->filterOptions = FILTER_FLAG_IPV4;
} elseif ($IPv6) {
$this->filterOptions = FILTER_FLAG_IPV6;
} elseif ($no_priv_range) {
$this->filterOptions = FILTER_FLAG_NO_PRIV_RANGE;
}
}