Esempio n. 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;
 }
Esempio n. 2
0
 /**
  * Loads a config file.
  *
  * @param string $file
  *
  * @return self
  */
 public function loadFile($file)
 {
     $content = $this->fileLoader->load($file, 'config');
     if ($this->placeholders) {
         $search = array_keys($this->placeholders);
         $replace = array_values($this->placeholders);
         $content = str_replace($search, $replace, $content);
     }
     $values = $this->parser->parse($content);
     $this->settings = array_merge($this->settings, $values);
     return $this;
 }
Esempio n. 3
0
 /**
  * Locates a plugin, which implements/extends a superclass.
  *
  * @param string $name
  * @param string $superclass
  *
  * @return string|false
  */
 public function locate($name, $superclass)
 {
     $this->assertPluginNameIsNotEmpty($name);
     $superclass = trim($superclass, '\\');
     $file = $this->getClassName($name) . '.php';
     $path = parent::locate($file, $superclass);
     return $path;
 }
Esempio n. 4
0
 /**
  * @test
  * @expectedException \Neat\Loader\Exception\UnexpectedValueException
  */
 public function load_nonExistingFile_throwsException()
 {
     $this->assertSame('dir3_test', $this->subject->load('test.php', $this->domain));
 }