/** * 检查当前应用名称空间文件路径 * * @param string $namespacePrefix * @param string $file * @return string; */ protected function checkAppNamespaceFilePath($namespacePrefix, $file) { if (class_exists('Powernote\\Support\\Facades\\Facade') && Facade::getFacadeApplication() != null) { $app = Facade::getFacadeApplication(); if ('App\\' == $namespacePrefix) { $path = str_replace($app['path.app'], '', $file); $fileName = pathinfo($file, PATHINFO_BASENAME); $exp = explode('/', $path); array_pop($exp); $path = strtolower(implode('/', $exp)); return $app['path.app'] . $path . '/' . $fileName; } } return $file; }
public function __construct() { $this->app = Facade::getFacadeApplication(); $this->files = new Filesystem(); }