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