src/Entity.php
protected function setParam($key, $value)
    {
        if (!array_key_exists($key, $this->_params)) {
            if ($this->_ignoreExisting || $this->arrayGet($this->_setup, 'suppress_errors') === true) {
                return;
            }

            throw new UnknownPropertyException("Unknown property: '{$key}'");
        }

        switch ($this->_types[$key]) {
            case "boolean":
                $this->_params[$key] = (bool)$value;
                break;
            case "integer":
                $this->_params[$key] = (integer)$value;
                break;
            case "float":
                $this->_params[$key] = (float)$value;
                break;
            case "string":
                $this->_params[$key] = (string)$value;
                break;
            case "array":
                $this->_params[$key] = (array)$value;
                break;
            default:
                $this->_params[$key] = $value;
                break;
        }
    }
protected function setParam($key, $value)
    {
        if (!array_key_exists($key, $this->_params)) {
            if ($this->_ignoreExisting || $this->arrayGet($this->_setup, 'suppress_errors') === true) {
                return;
            }

            throw new UnknownPropertyException("Unknown property: '{$key}'");
        }

        switch ($this->_types[$key]) {
            case "boolean":
                $this->_params[$key] = (bool)$value;
                break;
            case "integer":
                $this->_params[$key] = (integer)$value;
                break;
            case "float":
                $this->_params[$key] = (float)$value;
                break;
            case "string":
                $this->_params[$key] = (string)$value;
                break;
            case "array":
                $this->_params[$key] = (array)$value;
                break;
            default:
                $this->_params[$key] = $value;
                break;
        }
    }
protected function setParam ( $ key , $ value ) { if ( ! array_key_exists ( $ key , $ this -> _params ) ) { if ( $ this -> _ignoreExisting || $ this -> arrayGet ( $ this -> _setup , 'suppress_errors' ) === true ) { return ; } throw new UnknownPropertyException ( "Unknown property: '{$key}'" ) ; } switch ( $ this -> _types [ $ key ] ) { case "boolean" : $ this -> _params [ $ key ] = ( bool ) $ value ; break ; case "integer" : $ this -> _params [ $ key ] = ( integer ) $ value ; break ; case "float" : $ this -> _params [ $ key ] = ( float ) $ value ; break ; case "string" : $ this -> _params [ $ key ] = ( string ) $ value ; break ; case "array" : $ this -> _params [ $ key ] = ( array ) $ value ; break ; default : $ this -> _params [ $ key ] = $ value ; break ; } }
Set a value in the parameter pool and cast it to the same type as
the default value

@param  string $key
@param  mixed  $value

@throws UnknownPropertyException
Set a value in the parameter pool and cast it to the same type as the default value