private function discoverDataServices()
    {
        $path = $this->rootDir.'/'.$this->directory;
        $finder = new Finder();
        $finder->files()->in($path);

        /** @var SplFileInfo $file */
        foreach ($finder as $file) {
            $class = $this->classForFile($file);
            /* @var \Lullabot\Mpx\DataService\Annotation\DataService $annotation */
            $annotation = $this->annotationReader->getClassAnnotation(new \ReflectionClass($class), 'Lullabot\Mpx\DataService\Annotation\DataService');
            if (!$annotation) {
                continue;
            }

            // Now that we have a new data service, we need to attach any
            // custom field implementations.
            $customFields = $this->getCustomFields($annotation);
            $this->dataServices[$annotation->getService()][$annotation->getObjectType()][$annotation->getSchemaVersion()] = new DiscoveredDataService($class, $annotation, $customFields);
        }
    }
private function discoverDataServices()
    {
        $path = $this->rootDir.'/'.$this->directory;
        $finder = new Finder();
        $finder->files()->in($path);

        /** @var SplFileInfo $file */
        foreach ($finder as $file) {
            $class = $this->classForFile($file);
            /* @var \Lullabot\Mpx\DataService\Annotation\DataService $annotation */
            $annotation = $this->annotationReader->getClassAnnotation(new \ReflectionClass($class), 'Lullabot\Mpx\DataService\Annotation\DataService');
            if (!$annotation) {
                continue;
            }

            // Now that we have a new data service, we need to attach any
            // custom field implementations.
            $customFields = $this->getCustomFields($annotation);
            $this->dataServices[$annotation->getService()][$annotation->getObjectType()][$annotation->getSchemaVersion()] = new DiscoveredDataService($class, $annotation, $customFields);
        }
    }
private function discoverDataServices ( ) { $ path = $ this -> rootDir . '/' . $ this -> directory ; $ finder = new Finder ( ) ; $ finder -> files ( ) -> in ( $ path ) ; /** @var SplFileInfo $file */ foreach ( $ finder as $ file ) { $ class = $ this -> classForFile ( $ file ) ; /* @var \Lullabot\Mpx\DataService\Annotation\DataService $annotation */ $ annotation = $ this -> annotationReader -> getClassAnnotation ( new \ ReflectionClass ( $ class ) , 'Lullabot\Mpx\DataService\Annotation\DataService' ) ; if ( ! $ annotation ) { continue ; } // Now that we have a new data service, we need to attach any // custom field implementations. $ customFields = $ this -> getCustomFields ( $ annotation ) ; $ this -> dataServices [ $ annotation -> getService ( ) ] [ $ annotation -> getObjectType ( ) ] [ $ annotation -> getSchemaVersion ( ) ] = new DiscoveredDataService ( $ class , $ annotation , $ customFields ) ; } }
Discovers data services.
Discovers data services .