/**
  * @param string $path Directory path to compile
  */
 public function compile($path)
 {
     $this->loader->setCallback(function ($class, $file) {
         $reflClass = new \ReflectionClass($class);
         //Ignore abstract classes
         if ($reflClass->isAbstract()) {
             return;
         }
         $classAnnotations = $this->reader->getClassAnnotations($reflClass);
         $this->compileClass($reflClass, $classAnnotations);
         foreach ($reflClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflMethod) {
             /** @var $reflMethod \ReflectionMethod */
             $methodAnnotations = $this->reader->getMethodAnnotations($reflMethod);
             $this->compileMethod($reflClass, $reflMethod, $methodAnnotations);
         }
     });
     $this->loader->load($path);
 }
 /**
  * @dataProvider supportsProvider
  */
 public function testSupports($resource, $expected)
 {
     $this->assertEquals($expected, $this->instance->supports($resource));
 }