/**
  * Constructor.
  *
  * Initializes a new AnnotationReader.
  */
 public function __construct()
 {
     if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === "0" || ini_get('opcache.save_comments') === "0")) {
         throw AnnotationException::optimizerPlusSaveComments();
     }
     if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') == 0) {
         throw AnnotationException::optimizerPlusSaveComments();
     }
     if (PHP_VERSION_ID < 70000) {
         if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.load_comments') === "0" || ini_get('opcache.load_comments') === "0")) {
             throw AnnotationException::optimizerPlusLoadComments();
         }
         if (extension_loaded('Zend OPcache') && ini_get('opcache.load_comments') == 0) {
             throw AnnotationException::optimizerPlusLoadComments();
         }
     }
     AnnotationRegistry::registerFile(Mockingjay::getVendorRoot() . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php');
     $this->parser = new DocParser();
     $this->preParser = new DocParser();
     $this->preParser->setImports(self::$globalImports);
     $this->preParser->setIgnoreNotImportedAnnotations(true);
     $this->phpParser = new PhpParser();
 }
Esempio n. 2
0
 /**
  * Constructor.
  *
  * Initializes a new AnnotationReader.
  */
 public function __construct()
 {
     if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === "0" || ini_get('opcache.save_comments') === "0")) {
         throw AnnotationException::optimizerPlusSaveComments();
     }
     if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') == 0) {
         throw AnnotationException::optimizerPlusSaveComments();
     }
     if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.load_comments') === "0" || ini_get('opcache.load_comments') === "0")) {
         throw AnnotationException::optimizerPlusLoadComments();
     }
     if (extension_loaded('Zend OPcache') && ini_get('opcache.load_comments') == 0) {
         throw AnnotationException::optimizerPlusLoadComments();
     }
     AnnotationRegistry::registerFile(__DIR__ . '/Annotation/IgnoreAnnotation.php');
     $this->parser = new DocParser();
     $this->preParser = new DocParser();
     $this->preParser->setImports(self::$globalImports);
     $this->preParser->setIgnoreNotImportedAnnotations(true);
     $this->phpParser = new PhpParser();
 }