private static function actualValue(array $info, $value)
    {
        /**
         * Shortcut. Objects can be assigned as is.
         */
        if (is_object($value)) {
            return $value;
        }

        $types = explode('|', $info['type']);

        foreach ($types as $type) {
            switch ($type) {
                case 'integer':
                case 'string':
                case 'double':
                case 'boolean':
                case 'any':
                    return $value;
                case 'DateTime':
                    return new \DateTime($value, new \DateTimeZone('UTC'));
            }
        }

        return new $info['type']($value);
    }
private static function actualValue(array $info, $value)
    {
        
        if (is_object($value)) {
            return $value;
        }

        $types = explode('|', $info['type']);

        foreach ($types as $type) {
            switch ($type) {
                case 'integer':
                case 'string':
                case 'double':
                case 'boolean':
                case 'any':
                    return $value;
                case 'DateTime':
                    return new \DateTime($value, new \DateTimeZone('UTC'));
            }
        }

        return new $info['type']($value);
    }
private static function actualValue ( array $ info , $ value ) { /**
         * Shortcut. Objects can be assigned as is.
         */ if ( is_object ( $ value ) ) { return $ value ; } $ types = explode ( '|' , $ info [ 'type' ] ) ; foreach ( $ types as $ type ) { switch ( $ type ) { case 'integer' : case 'string' : case 'double' : case 'boolean' : case 'any' : return $ value ; case 'DateTime' : return new \ DateTime ( $ value , new \ DateTimeZone ( 'UTC' ) ) ; } } return new $ info [ 'type' ] ( $ value ) ; }
Helper function when assigning values via the ctor.

@param array $info The metadata for the property.
@param mixed $value The property value.

@return mixed
Helper function when assigning values via the ctor .