Jarves\Configuration\EntryPoint::getClass PHP Method

getClass() public method

public getClass ( ) : string
return string
    public function getClass()
    {
        return $this->class;
    }

Usage Example

コード例 #1
0
ファイル: RestApiLoader.php プロジェクト: jarves/jarves
 public function setupWindowRoute(EntryPoint $entryPoint)
 {
     $class = $entryPoint->getClass();
     if (!class_exists($class)) {
         throw new ClassNotFoundException(sprintf('Class `%s` not found in entryPoint `%s`', $class, $entryPoint->getFullPath()));
     }
     /** @var $importedRoutes \Symfony\Component\Routing\RouteCollection */
     $importedRoutes = $this->import($class, 'annotation');
     $classReflection = new \ReflectionClass($class);
     $objectKey = $classReflection->getDefaultProperties()['object'];
     $object = $this->jarves->getObjects()->getDefinition($objectKey);
     if (!$object) {
         throw new ObjectNotFoundException(sprintf('Object `%s` in entryPoint `%s` of class `%s` not found.', $objectKey, $entryPoint->getFullPath(), $class));
     }
     $pattern = $entryPoint->getFullPath();
     $this->addEntryPointRoutes($importedRoutes, $pattern, $object);
 }