Example #1
0
 /**
  * Retrieves the content.
  *
  * @return string
  */
 public function getContent()
 {
     $content = '<span>Class Locations: </span>';
     $content .= $this->formatLocations($this->classLoader->getLocations());
     $content .= '<br />';
     $content .= '<span>Plugin Locations: </span>';
     $content .= $this->formatLocations($this->pluginLoader->getLocations());
     $content .= '<br />';
     $content .= '<span>File Locations: </span>';
     $content .= $this->formatLocations($this->fileLoader->getLocations());
     return $content;
 }
Example #2
0
File: App.php Project: neatphp/neat
 /**
  * Retrieves the loader.
  *
  * @return ClassLoader
  */
 public function getLoader()
 {
     if (is_null($this->loader)) {
         $this->loader = new ClassLoader();
         $this->loader->setLocation($this->getNamespace(), [$this->basedir . '/src']);
         $this->loader->setLocation('Neat', [__DIR__]);
     }
     return $this->loader;
 }
Example #3
0
 /**
  * @test
  */
 public function autoload()
 {
     $this->assertTrue($this->subject->autoload($this->namespace . '\\Fixture\\TestClass2'));
     $this->assertTrue($this->subject->autoload($this->namespace . '\\Fixture\\TestClass3'));
     $this->assertFalse($this->subject->autoload($this->namespace . '\\Fixture\\TestClass'));
 }