Beispiel #1
0
 /**
  * {@inheritDoc}
  */
 public function __invoke($className)
 {
     if (class_exists($className, false) || !$this->classNameInflector->isProxyClassName($className)) {
         return false;
     }
     $file = $this->fileLocator->getProxyFileName($className);
     if (!file_exists($file)) {
         return false;
     }
     return (bool) (require_once $file);
 }
Beispiel #2
0
 /**
  * {@inheritDoc}
  */
 public function __invoke(string $className) : bool
 {
     if (class_exists($className, false) || !$this->classNameInflector->isProxyClassName($className)) {
         return false;
     }
     $file = $this->fileLocator->getProxyFileName($className);
     if (!file_exists($file)) {
         return false;
     }
     /* @noinspection PhpIncludeInspection */
     return (bool) (require_once $file);
 }