Neos\Flow\Package\MetaData\AbstractConstraint::__construct PHP Метод

__construct() публичный Метод

Meta data constraint constructor
public __construct ( string $constraintType, string $value, string $minVersion = null, string $maxVersion = null )
$constraintType string
$value string
$minVersion string
$maxVersion string
    public function __construct($constraintType, $value, $minVersion = null, $maxVersion = null)
    {
        $this->constraintType = $constraintType;
        $this->value = $value;
        $this->minVersion = $minVersion;
        $this->maxVersion = $maxVersion;
    }

Usage Example

 /**
  * Meta data system constraint constructor
  *
  * @param string $constraintType
  * @param string $type
  * @param string $value
  * @param string $minVersion
  * @param string $maxVersion
  */
 public function __construct($constraintType, $type, $value = null, $minVersion = null, $maxVersion = null)
 {
     if ($value === '') {
         $value = null;
     }
     parent::__construct($constraintType, $value, $minVersion, $maxVersion);
     $this->type = $type;
 }