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


PHP Filter::__construct方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:sjaakmoes,项目名称:dotapi2,代码行数:12,代码来源:Tournament.php

示例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);
     }
 }
开发者ID:cujan,项目名称:atlashornin,代码行数:13,代码来源:Select.php

示例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.");
         }
     }
 }
开发者ID:bfpi,项目名称:klarschiff-frontend-mit-mapbender,代码行数:26,代码来源:class_OgcFilter.php

示例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();
 }
开发者ID:badlamer,项目名称:hhvm,代码行数:7,代码来源:subclass.php

示例5: __construct

 public function __construct($primaryTable, $primaryTableAlias, $primaryJoinField)
 {
     parent::__construct();
     $this->primaryTable = $primaryTable;
     $this->primaryTableAlias = $primaryTableAlias;
     $this->primaryJoinField = new Field($primaryJoinField, $primaryTableAlias);
 }
开发者ID:Welvin,项目名称:stingle,代码行数:7,代码来源:MergeableFilter.class.php

示例6: __construct

 /**
  * Constructor
  *
  * @param  callable $callback
  * @return void
  */
 public function __construct($callback)
 {
     parent::__construct($callback);
     // Set the default signature
     $this->resetParameters();
     $this->addParameterByName('attrValue');
 }
开发者ID:CryptArc,项目名称:TextFormatter,代码行数:13,代码来源:AttributeFilter.php

示例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;
     }
 }
开发者ID:eredi93,项目名称:forms,代码行数:14,代码来源:URL.php

示例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));
     }
 }
开发者ID:alexamiryan,项目名称:stingle,代码行数:8,代码来源:UsersFilter.class.php

示例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);
     }
 }
开发者ID:sjaakmoes,项目名称:dotapi2,代码行数:14,代码来源:BroadcasterInfo.php

示例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;
 }
开发者ID:roncemer,项目名称:pfmgr2,代码行数:9,代码来源:IntFilter.class.php

示例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;
 }
开发者ID:s-diez,项目名称:FACT-Finder-PHP-Library,代码行数:18,代码来源:SliderFilter.php

示例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')));
 }
开发者ID:Welvin,项目名称:stingle,代码行数:10,代码来源:MessageFilter.class.php

示例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);
     }
 }
开发者ID:sjaakmoes,项目名称:dotapi2,代码行数:16,代码来源:MatchSequence.php

示例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());
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:27,代码来源:PersistableFilter.inc.php

示例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;
     }
 }
开发者ID:eredi93,项目名称:forms,代码行数:21,代码来源:IPAddress.php


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