Get scanned modules paths.

@return array
351660
public function getScanPaths() : array
    {
        $paths = $this->paths;

        $paths[] = $this->getPath();

        if ($this->config('scan.enabled')) {
            $paths = array_merge($paths, $this->config('scan.paths'));
        }

        $paths = array_map(function ($path) {
            return ends_with($path, '/*') ? $path : str_finish($path, '/*');
        }, $paths);

        return $paths;
    }
320147
private function getApplicationPathFiles(){

		$this->setPathURI(explode('/', preg_replace('/^[\/]*(.*?)[\/]*$/', '\\1', $_SERVER['REQUEST_URI'])));
		$a=$this->getPathURI();


		if($this->getEnvironmentStatus()=='development'){
			$nun_level=explode("/", $this->getAddressUri());

			for ($i=0; $i < count($nun_level)-2; $i++) {
				array_shift($a);
			}
			$this->setPathURI($a);
		}
		foreach ($a as $key => $value) {
			if($this->getNameApplication()==$value){
				unset($a[$key]);
			}
		}

		if(reset($a)=='helpers'){
			array_shift($a);
			$helpers=true;
		}else{
			$helpers=false;
		}
		$this->setPathURI($a);

		foreach ($a as $key => $value) {
			$this->posURL[]=$value;
		}


		$url_array=$this->getPathURI();

		$directory_action=$directory_ctrl=$directory_view='';

		if($helpers==true){

			$directory_action = $this->getPathApplication().'helpers';

			do{
				if( in_array(current($url_array), scandir($directory_action))){
					$directory_action.='/'.current($url_array);
					next($url_array);
					$dir = false;
					if(isset($url_array[key($url_array)+1])){
						$this->setMethodsURI($url_array[key($url_array)+1]);
					}
				}else if( in_array(current($url_array).'.php', scandir($directory_action))){
					$directory_action.='/'.current($url_array).'.php';
					next($url_array);
					$dir = true;
				}else{
					$directory_action.='/index.php';
					$dir = true;
				}
			}while(!$dir);
		}else{
			$directory_ctrl = $this->getPathApplication().'controllers';
			$directory_view = $this->getPathApplication().'views/pages';
			$this->urlCompletePath = substr($this->getPathBaseHref(),0,-1);
			do{
				if( (file_exists($directory_view) && in_array(current($url_array), scandir($directory_view))) || (file_exists($directory_ctrl) && in_array(current($url_array), scandir($directory_ctrl))) ){
					$directory_ctrl.='/'.current($url_array);
					$directory_view.='/'.current($url_array);
					$this->urlCompletePath.='/'.(current($url_array)!='index'?current($url_array):'');
					next($url_array);
					$dir = false;
					if(isset($url_array[key($url_array)])){
						$this->setMethodsURI($url_array[key($url_array)]);
					}
				}else if( (file_exists($directory_view) && in_array(current($url_array).'.php', scandir($directory_view))) || (file_exists($directory_ctrl) && in_array(current($url_array).'.php', scandir($directory_ctrl))) ){
					$directory_ctrl.='/'.current($url_array).'.php';
					$directory_view.='/'.current($url_array).'.php';
					$this->urlCompletePath.='/'.(current($url_array)!='index'?current($url_array):'');
					next($url_array);
					if(isset($url_array[key($url_array)])){
						$this->setMethodsURI($url_array[key($url_array)]);
					}
					$dir = true;
				}else{
					if(isset($url_array[key($url_array)])){
						$this->setMethodsURI($url_array[key($url_array)]);
					}

					if((count($url_array)==0 || is_int(key($url_array)) == false) || (isset($url_array) && $url_array[0]=='')){
						$directory_ctrl.='/index.php';
						$directory_view.='/index.php';
						$this->urlCompletePath.='/';
					}
					$dir = true;
				}

			}while(!$dir);
		}

		//verifica se existe a view
		if($helpers==true && file_exists($directory_action) && is_file($directory_action) ){
			// inicia actoin
			$this->setPageAction($directory_action);
			$this->instanceTemplate($this->getPageAction());
			if (strpos($_SERVER['HTTP_ACCEPT'], 'htm') === false) {
			}else{
				$helpers=false;
				$this->setPageView($this->getPathApplication('views/error/','404.php'));
			}
		}else if((file_exists($directory_ctrl) && is_file($directory_ctrl)) || (file_exists($directory_view) && is_file($directory_view))){
			// inicia controller
			$this->setPageCtrl($directory_ctrl);
			$this->setPageView($directory_view);
		}
		if(!file_exists($directory_ctrl) || !is_file($directory_ctrl)){
			$this->setPageCtrl($this->getPathApplication('controllers/error/','404.php'));
		}
		if(!file_exists($directory_view) || !is_file($directory_view)){
			$this->setPageView($this->getPathApplication('views/error/','404.php'));
		}

		if($helpers==false){
			$this->instanceTemplate($this->getPathApplication('views/layout/','template.php'));
		}

	}
633293
public function getSchemaSearchPaths()
    {
        $params = $this->_conn->getParams();
        $schema = explode(',', $this->_conn->fetchColumn('SHOW search_path'));

        if (isset($params['user'])) {
            $schema = str_replace('"$user"', $params['user'], $schema);
        }

        return array_map('trim', $schema);
    }
1183882
protected function getMigrationPaths()
    {
        // Here, we will check to see if a path option has been defined. If it has we will
        // use the path relative to the root of the installation folder so our database
        // migrations may be run for any customized path from within the application.
        if ($this->input->hasOption('path') && $this->option('path')) {
            return collect($this->option('path'))->map(function ($path) {
                return ! $this->usingRealPath()
                                ? $this->laravel->basePath().'/'.$path
                                : $path;
            })->all();
        }

        return array_merge(
            $this->migrator->paths(), [$this->getMigrationPath()]
        );
    }
919575
protected function getModulePaths()
    {
        // Project root is always returned
        $basePath = $this->getProjectPath();
        yield $basePath;

        // Get vendor modules
        $search = Util::joinPaths($basePath, 'vendor', '*', '*');
        foreach (glob($search, GLOB_ONLYDIR) as $modulePath) {
            if ($this->isPathModule($modulePath)) {
                yield $modulePath;
            }
        }

        // Check if public/ folder exists
        $publicExists = is_dir(Util::joinPaths($basePath, Library::PUBLIC_PATH));
        if (!$publicExists) {
            return;
        }

        // Search all base folders / modules
        $search = Util::joinPaths($basePath, '*');
        foreach (glob($search, GLOB_ONLYDIR) as $modulePath) {
            if ($this->isPathModule($modulePath)) {
                yield $modulePath;
            }
        }

        // Check all themes
        $search = Util::joinPaths($basePath, 'themes', '*');
        foreach (glob($search, GLOB_ONLYDIR) as $themePath) {
            yield $themePath;
        }
    }
899257
protected function getCallPaths(): array
    {
        $paths = [];
        $backTrace = \debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
        foreach ($backTrace as $value) {
            if (isset($value['file'])) {
                $paths[] = $value['file'];
            }
        }

        return $paths;
    }
522505
protected function getPaths(): array
    {
        $paths = [
            base_path('app'),
            base_path('modules'),
            base_path('resources'),
            base_path('routes'),
        ];

        foreach ($paths as $i => $path) {
            if (!File::isDirectory($path)) {
                unset($paths[$i]);
            }
        }

        return $paths;
    }
724766
public function extractModulePaths()
    {
        $aModules = $this->getModulesWithExtendedClass();
        $aModulePaths = [];

        if (is_array($aModules) && count($aModules) > 0) {
            foreach ($aModules as $aModuleClasses) {
                foreach ($aModuleClasses as $sModule) {
                    $sModuleId = substr($sModule, 0, strpos($sModule, "/"));
                    $aModulePaths[$sModuleId] = $sModuleId;
                }
            }
        }

        return $aModulePaths;
    }
1374824
public function getActiveModuleInfo()
    {
        $aModulePaths = $this->getModuleConfigParametersByKey(static::MODULE_KEY_PATHS);

        // Extract module paths from extended classes
        if (!is_array($aModulePaths) || count($aModulePaths) < 1) {
            $aModulePaths = $this->extractModulePaths();
        }

        $aDisabledModules = $this->getDisabledModules();
        if (is_array($aDisabledModules) && count($aDisabledModules) > 0 && count($aModulePaths) > 0) {
            $aModulePaths = array_diff_key($aModulePaths, array_flip($aDisabledModules));
        }

        return $aModulePaths;
    }
1199858
protected function getMigrationPaths()
    {
        // Here, we will check to see if a path option has been defined. If it has we will
        // use the path relative to the root of the installation folder so our database
        // migrations may be run for any customized path from within the application.
        if ($this->input->hasOption('path') && $this->option('path')) {
            return collect($this->option('path'))->map(function ($path) {
                return $this->laravel->basePath().'/'.$path;
            })->all();
        }

        return [$this->getMigrationPath()];
    }
375240
public function getModulesPath()
    {
        $paths = $this->locator->getModulesPath();
        foreach (array_keys($paths) as $module) {
            $paths[$module] .= DIRECTORY_SEPARATOR . TemplateReference::MODULE_VIEWS_DIRECTORY;
        }

        return $paths;
    }
1299716
protected function getModuleInfo(): array
    {
        if ($this->moduleInfo === null) {
            $this->moduleInfo = $this->package()->getExtra()['module'] ?? [];
        }

        return $this->moduleInfo;
    }
979978
private function getModuleNavigation()
	{
		$modules = $this->getDoctrine()->getRepository(Module::class)->findBy([
			"active" => true,
			"displayed" => true
		]);
		
		foreach ($modules as $module) {
			$navigation = json_decode(file_get_contents($this->get("ribs_admin.globals")->getBaseBundlePath
				($module->getPackageName()) . "/Resources/json/navigation.json"), true);
			
			foreach ($navigation["items"] as $item) {
				if ($this->get("ribs_admin.acess_rights")->testRight($item["right"])) {
					$this->nav[] = $item;
				}
			}
		}
	}
681638
private function getRouteFolders()
    {
        $rotas = \Config\Config::getViewPermissoes();
        $libsPath[] = [DOMINIO => "public/{$this->directory}"];
        if (!empty($_SESSION['userlogin'])) {
            $libsPath[][DOMINIO] = "public/{$this->directory}/{$_SESSION['userlogin']['setor']}";
            $libsPath = array_merge($libsPath, array_map(function ($class) {
                return [$class => VENDOR . $class . "/public/{$this->directory}/{$_SESSION['userlogin']['setor']}"];
            }, $rotas));
        }
        $libsPath = array_merge($libsPath, array_map(function ($class) {
            return [$class => VENDOR . $class . "/public/{$this->directory}"];
        }, $rotas));

        return $libsPath;
    }
409504
public static function getModules()
    {
        return \Cache::remember('modules', 604800, function ()
        {
            $diskModules = Module::getModulesFromDisk();
            if ($diskModules)
                return self::checkModulesInDb($diskModules);
            else
                return [];
        });
    }
827663
public function listModules()
    {
        $uri = 'asterisk/modules';

        $response = $this->client->getEndpoint()->get($uri);

        $modules = [];
        foreach (\GuzzleHttp\json_decode($response->getBody()) as $module) {
            $modules[] = new Module($module);
        }

        return $modules;
    }
1305613
public function getPaths()
    {
        if (strpos('@PHP-BIN@', '@PHP-BIN') === 0) {
            $dataDir = dirname(__FILE__) . '/../';
            $phpDir = dirname(__FILE__) . '/';
        } else {
            $dataDir = '@DATA-DIR@/Phrozn/';
            $phpDir = '@PEAR-DIR@/Phrozn/';
        }
        return array(
            'data_dir'      => $dataDir,
            'php_dir'       => $phpDir,
            'configs'   => $dataDir . 'configs/',
            'skeleton'  => $dataDir . 'skeleton/',
            'library'   => $phpDir,
        );
    }