/** * Constructor. * * You can specify the allowed values either by passing an array, * or by passing each value as an argument. You can also specify * if the criterion should care about capitalization or not by * adding a boolean as last argument. This value default to false. * * @since 0.4 */ public function __construct() { parent::__construct(); $args = func_get_args(); $lastElement = array_pop( $args ); if ( is_bool( $lastElement ) ) { // The element is a boolean, so it's the capitalization parameter. $this->careAboutCapitalization = $lastElement; } else { // Add the element back to the array. $args[] = $lastElement; } if ( count( $args ) > 1 ) { $this->allowedValues = $args; } elseif ( count( $args ) == 1 ) { $this->allowedValues = (array)$args[0]; } else { // Not a lot that will pass validation in this case :D $this->allowedValues = array(); } if ( !$this->careAboutCapitalization ) { // If case doesn't matter, lowercase everything and later on compare a lowercased value. $this->allowedValues = array_map( 'strtolower', $this->allowedValues ); } }
/** * Constructor * * @since 3.0 */ public function __construct() { parent::__construct(); }
/** * Constructor. * * @param string $pattern * * @since 0.4 */ public function __construct( $pattern ) { parent::__construct(); $this->pattern = $pattern; }
/** * Constructor. * * @param bool $hasToExist if set to true, the title has to be an existing one. If false, the name * is just checked for validity within the wikis regulations. * * @since 0.4.14 */ public function __construct($hasToExist = false) { $this->hasToExist = $hasToExist; parent::__construct(); }
/** * Constructor. * * @since 0.7 * * @param string $dimension */ public function __construct($dimension) { parent::__construct(); $this->dimension = $dimension; }
/** * Constructor. * * @param mixed $lowerBound * @param mixed $upperBound * * @since 0.4 */ public function __construct($lowerBound, $upperBound) { parent::__construct(); $this->lowerBound = $lowerBound; $this->upperBound = $upperBound; }
/** * Constructor. * * @param boolean $negativesAllowed since 0.4.8 * * @since 0.4 */ public function __construct($negativesAllowed = true) { $this->negativesAllowed = $negativesAllowed; parent::__construct(); }
/** * Constructor. * * @since 0.7 */ public function __construct($metaDataSeparator = false) { parent::__construct(); $this->metaDataSeparator = $metaDataSeparator; }
/** * Constructor. * * @param integer $lowerBound False for no lower bound (since 0.4.8). * @param mixed $upperBound False for same value as lower bound. False for no upper bound (since 0.4.8). * * @since 0.4 */ public function __construct($lowerBound, $upperBound = null) { parent::__construct(); $this->lowerBound = $lowerBound; $this->upperBound = is_null($upperBound) ? $lowerBound : $upperBound; }
/** * Constructor. * * @param string $groupNameSeparator Separator between layer group and the * layers name within the group. * * @since 0.7 (meaning of first param changed in 3.0) */ public function __construct($groupNameSeparator = ';') { parent::__construct(); $this->groupNameSep = $groupNameSeparator; }
/** * Constructor. * * @since 0.7 */ public function __construct($service) { parent::__construct(); $this->service = $service; }
/** * Constructor. * * @since 0.7 * * @param array $overlayData */ public function __construct(array $overlayData) { parent::__construct(); $this->overlayData = $overlayData; }