/** * 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; }
/** * 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; }
/** * 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; }
/** * @test * @expectedException \Neat\Loader\Exception\UnexpectedValueException */ public function load_nonExistingFile_throwsException() { $this->assertSame('dir3_test', $this->subject->load('test.php', $this->domain)); }