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

        switch ($info['type']) {
            case 'integer':
            case 'string':
            case 'double':
            case 'boolean':
                return $value;
            case 'DateTime':
                return new \DateTime($value, new \DateTimeZone('UTC'));
            default:
                return new $info['type']($value);
        }
    }
private static function actualValue($info, $class, $property, $value)
    {
        /**
         * Shortcut. Objects can be assigned as is.
         */
        if (is_object($value)) {
            return $value;
        }

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