findServices() public method

Find all services given a source directory
public findServices ( string $srcDir ) : array
$srcDir string
return array
示例#1
0
 public function testNoAnnotations()
 {
     $serviceResolver = new ServiceResolver();
     $services = $serviceResolver->findServices(TEST_DIR . '/ServiceResolver/NoAnnotations');
     $this->assertEquals([], $services);
 }
示例#2
0
 /**
  * Use the service resolver to find all the services dynamically
  *
  * @param string $srcDir
  * @return int Number of services cached
  */
 public function cacheAll($srcDir)
 {
     $this->services = $this->serviceResolver->findServices($srcDir);
     return $this->createCache();
 }