Data/DataContainer.php
public function defineProperty(string $property, $constraints = [], $defaultValue = null)
    {
        $this->validProperties[$property] = $constraints;

        if (!is_null($defaultValue)) {
            $this->defaultValues[$property] = $defaultValue;
        }
    }
public function defineProperty(string $property, $constraints = [], $defaultValue = null)
    {
        $this->validProperties[$property] = $constraints;

        if (!is_null($defaultValue)) {
            $this->defaultValues[$property] = $defaultValue;
        }
    }
public function defineProperty ( string $ property , $ constraints = [ ] , $ defaultValue = null ) { $ this -> validProperties [ $ property ] = $ constraints ; if ( ! is_null ( $ defaultValue ) ) { $ this -> defaultValues [ $ property ] = $ defaultValue ; } }
Define a property on data container
@param string $property
@param array $constraints
@param null $defaultValue
@throws PropertyNotValidException
Define a property on data container