public function parse($value, $class = null)
    {
        if (! class_exists($class)) {
            throw new ParserException("Concrete annotation expects {$class} to exist.");
        }

        $prototype = (new JsonType)->parse($value);

        if ($prototype instanceof stdClass) {
            if (! $this->isPrototypeSchemaValid($prototype)) {
                throw new ParserException("Only arrays should be used to configure concrete annotation method calls.");
            }

            return $this->makeInstance($class, $prototype);
        }

        if (is_array($prototype)) {
            return $this->makeConstructSugarInjectionInstance($class, $prototype);
        }

        throw new ParserException("Json value for annotation({$class}) must be of type object or array.");
    }
public function parse($value, $class = null)
    {
        if (! class_exists($class)) {
            throw new ParserException("Concrete annotation expects {$class} to exist.");
        }

        $prototype = (new JsonType)->parse($value);

        if ($prototype instanceof stdClass) {
            if (! $this->isPrototypeSchemaValid($prototype)) {
                throw new ParserException("Only arrays should be used to configure concrete annotation method calls.");
            }

            return $this->makeInstance($class, $prototype);
        }

        if (is_array($prototype)) {
            return $this->makeConstructSugarInjectionInstance($class, $prototype);
        }

        throw new ParserException("Json value for annotation({$class}) must be of type object or array.");
    }
public function parse ( $ value , $ class = null ) { if ( ! class_exists ( $ class ) ) { throw new ParserException ( "Concrete annotation expects {$class} to exist." ) ; } $ prototype = ( new JsonType ) -> parse ( $ value ) ; if ( $ prototype instanceof stdClass ) { if ( ! $ this -> isPrototypeSchemaValid ( $ prototype ) ) { throw new ParserException ( "Only arrays should be used to configure concrete annotation method calls." ) ; } return $ this -> makeInstance ( $ class , $ prototype ) ; } if ( is_array ( $ prototype ) ) { return $ this -> makeConstructSugarInjectionInstance ( $ class , $ prototype ) ; } throw new ParserException ( "Json value for annotation({$class}) must be of type object or array." ) ; }
Process a value to be a concrete annotation

@param  string                              $value json string
@param  string                              $class name of concrete annotation type (class)
@throws \Minime\Annotations\ParserException
@return object
Process a value to be a concrete annotation