public function cast($value)
    {
        if (!isset($this->typecast)) {
            throw new LogicException("Type cast for multiple handler not set");
        }

        $type = $this->typeGuess->guess($value, $this->types);

        return isset($type) ? $this->typecast->to($type)->cast($value) : $this->dontCast($value);
    }
public function cast($value)
    {
        if (!isset($this->typecast)) {
            throw new LogicException("Type cast for multiple handler not set");
        }

        $type = $this->typeGuess->guess($value, $this->types);

        return isset($type) ? $this->typecast->to($type)->cast($value) : $this->dontCast($value);
    }
public function cast ( $ value ) { if ( ! isset ( $ this -> typecast ) ) { throw new LogicException ( "Type cast for multiple handler not set" ) ; } $ type = $ this -> typeGuess -> guess ( $ value , $ this -> types ) ; return isset ( $ type ) ? $ this -> typecast -> to ( $ type ) -> cast ( $ value ) : $ this -> dontCast ( $ value ) ; }
Cast the value to one of the types.

@param mixed $value
@return mixed
Cast the value to one of the types .