@param string $path
@param string $baseNamespace
@param string $baseLocation

@return array
7029
protected function extractNamespaceClasses($path, $baseNamespace, $baseLocation)
    {
        $classes = [];
        $finder = new Finder();
        foreach ($finder->in($path)->name('/.php$/')->getIterator() as $file) {
            $className = preg_replace('/.php$/', null, $file->getFilename());
            if ($file->getRelativePath()) {
                $subNamespace = str_replace('/', '\\', $file->getRelativePath());
                $fullyClassName = $baseNamespace.'\\'.$baseLocation.'\\'.$subNamespace.'\\'.$className;
            } else {
                $fullyClassName = $baseNamespace.'\\'.$baseLocation.'\\'.$className;
            }
            if (class_exists($fullyClassName) || interface_exists($fullyClassName)) {
                $classes[] = $fullyClassName;
            }
        }

        return $classes;
    }
149983
protected function generateLangEn($namespace, $basePath, ClassMetadata $metadata)
    {
        $entityName = $this->getEntityNameFromMetadata($metadata);
        $entityNamePlural = $entityName.'s';
        $entityNameCamelized = $this->camelize($entityName);
        $yamlFile = $basePath.'/Resources/translations/'.$this->getBundleName().$entityName.'.en.yml';
        $trans = $this->getTrans($yamlFile);

        if (!array_key_exists($entityName, $trans)) {
            $trans[$entityName] = $entityName;
        }
        if (!array_key_exists($entityNamePlural, $trans)) {
            $trans[$entityNamePlural] = $entityNamePlural;
        }

        if (!array_key_exists('link_'.$entityNameCamelized.'_list', $trans['breadcrumb'])) {
            $trans['breadcrumb']['link_'.$entityNameCamelized.'_list'] = $entityName.' List';
        }
        if (!array_key_exists('link_'.$entityNameCamelized.'_show', $trans['breadcrumb'])) {
            $trans['breadcrumb']['link_'.$entityNameCamelized.'_show'] = 'Show '.$entityName;
        }
        if (!array_key_exists('link_'.$entityNameCamelized.'_create', $trans['breadcrumb'])) {
            $trans['breadcrumb']['link_'.$entityNameCamelized.'_create'] = 'Create '.$entityName;
        }
        if (!array_key_exists('link_'.$entityNameCamelized.'_edit', $trans['breadcrumb'])) {
            $trans['breadcrumb']['link_'.$entityNameCamelized.'_edit'] = 'Edit '.$entityName;
        }
        if (!array_key_exists('link_'.$entityNameCamelized.'_delete', $trans['breadcrumb'])) {
            $trans['breadcrumb']['link_'.$entityNameCamelized.'_delete'] = 'Delete '.$entityName;
        }
        if (!array_key_exists('link_'.$entityNameCamelized.'_history', $trans['breadcrumb'])) {
            $trans['breadcrumb']['link_'.$entityNameCamelized.'_history'] = $entityName.' History';
        }

        $fields = array_merge($metadata->fieldMappings, $metadata->associationMappings);
        foreach ($fields as $field) {
            $fieldName = $field['fieldName'];
            $key = $this->camelize($fieldName);
            if (!array_key_exists('label_'.$key, $trans['list'])) {
                $trans['list']['label_'.$key] = $this->toText($fieldName);
            }
            if (!array_key_exists('label_'.$key, $trans['filter'])) {
                $trans['filter']['label_'.$key] = $this->toText($fieldName);
            }
            if (!array_key_exists('label_'.$key, $trans['show'])) {
                $trans['show']['label_'.$key] = $this->toText($fieldName);
            }
            if (!array_key_exists('label_'.$key, $trans['form'])) {
                $trans['form']['label_'.$key] = $this->toText($fieldName);
            }
        }
        $trans['list']['label__action'] = 'Actions';

        $out = Yaml::dump($trans, 4);
        if (file_put_contents($yamlFile, $out) !== false) {
            return sprintf('<info>Update %s</info>', $this->getRelativeFilePath($yamlFile));
        } else {
            return sprintf('<error>Unable to update %s</error>', $this->getRelativeFilePath($yamlFile));
        }
    }
1223215
protected function mapWebRoute(string $path, string $moduleNameSpace) {
		Route::middleware('web')
		     ->namespace($this->getNamespace($moduleNameSpace))
		     ->group($path);
	}
216090
public function base_path($path = null)
    {
        return empty($path) ? $this->path : $this->path . $path;
    }
456391
public function getUrl($paths, $basePath = null)
    {
        if (is_array($paths) === false) {
            $paths = array($paths);
        }

        $minUrl = $this->container->get('router')->generate('rednose_combo_handler_combo');

        foreach ($paths as &$path) {
            if ($basePath !== null) {
                $path = $basePath . '/' . $path;
            }

            $files[] = $path;
        }

        $files = implode(',', $paths);

        return $minUrl . '?' . $files;
    }
257972
private function resolveLocalPath($path, $baseFolder)
    {
        $path = $this->filesystem->normalizePath($path);
        if ($this->filesystem->isAbsolutePath($path)) {
            return $path;
        }
        if (stripos($baseFolder, 'file://') === 0) {
            $baseFolder = substr($baseFolder, 7);
        }
        $baseFolder = $this->filesystem->normalizePath($baseFolder);

        return $baseFolder.'/'.$path;
    }
781145
public function getAst(Node\Node $b, $path = '')
    {
        $ret = array(
            'type' => str_replace('Zicht\Tool\Script\Node\\', '', get_class($b))
        );
        if ($b instanceof Node\Branch) {
            if (count($b->nodes)) {
                $ret['nodes'] = array();

                foreach ($b->nodes as $n) {
                    if (null === $n) {
                        $ret['nodes'][] = $n;
                    } else {
                        if (!$n instanceof Node\Node) {
                            throw new \InvalidArgumentException("Invalid child node in " . Util::toPhp($path));
                        }
                        $ret['nodes'][] = $this->getAst($n);
                    }
                }
            }
        }

        return $ret;
    }
1062028
public function findShadowNodeByPath($path, Workspace $workspace, array $dimensions = null)
    {
        $workspaces = $this->collectWorkspaceAndAllBaseWorkspaces($workspace);
        $nodes = $this->findRawNodesByPath($path, $workspace, $dimensions, true);
        $dimensions = $dimensions === null ? [] : $dimensions;
        $foundNodes = $this->reduceNodeVariantsByWorkspacesAndDimensions($nodes, $workspaces, $dimensions);
        $foundNodes = $this->onlyRemovedNodes($foundNodes);

        if ($foundNodes !== []) {
            return reset($foundNodes);
        }

        return null;
    }
1108934
public function getChildren($path)
    {
        $node = $this->getNodeForPath($path);
        $basePath = trim($path, '/');
        if ('' !== $basePath) {
            $basePath .= '/';
        }

        foreach ($node->getChildren() as $child) {
            $this->cache[$basePath.$child->getName()] = $child;
            yield $child;
        }
    }
1256445
function from($namespacePath)
    {
        if ($namespacePath === '')
            # from recursion calls
            return $this;

        // ..

        $cNamespace = $this->_normalizeNamespace($namespacePath);

        if (false === strstr($cNamespace, self::SEPARATOR)) {
            ## recursion fallback here !!
            if (!isset($this->__nestRight[$cNamespace]))
                return false;

            return $this->__nestRight[$cNamespace];
        }

        // ..

        $namespacePath = rtrim($namespacePath, self::SEPARATOR);
        $brkNamespace  = explode(self::SEPARATOR, $namespacePath);


        ## /root/to/nested/namespace
        $cNamespace   = array_shift($brkNamespace);
        $cContainer   = $this;
        if ($cNamespace === '') {
            ## Start with / (separator)
            #- Goto Root Container
            while ($cContainer->__nestLeft)
                $cContainer = $cContainer->__nestLeft;
        }
        else $cContainer = $this->from($cNamespace); ## fallback

        ## fallback recursion from root parent
        return ($cContainer == false) ? $cContainer : $cContainer->from(implode(self::SEPARATOR, $brkNamespace));
    }
980119
private function delBase($bucket, $path)
    {
        if ($path == "/") {
            return [
                'code'      => Response::COSAPI_PARAMS_ERROR,
                'message'   => 'can not delete bucket using api! go to ' .
                    'http://console.qcloud.com/cos to operate bucket'
            ];
        }

        $path       = self::cosUrlEncode($path);
        $url        = self::generateResUrl($bucket, $path);
        $signature  = $this->createNonreusableSignature($bucket, $path);
        $data       = ['op' => 'delete'];
        $data       = json_encode($data);

        $req = [
            'url'       => $url,
            'method'    => 'post',
            'timeout'   => self::$timeout,
            'data'      => $data,
            'header'    => [
                'Authorization: ' . $signature,
                'Content-Type: application/json',
            ],
        ];

        return self::sendRequest($req);
    }
264316
private static function basename($path)
    {
        $separators = DIRECTORY_SEPARATOR === '/' ? '/' : '\/';

        $path = rtrim($path, $separators);

        $basename = preg_replace('#.*?([^' . preg_quote($separators, '#') . ']+$)#', '$1', $path);

        if (DIRECTORY_SEPARATOR === '/') {
            return $basename;
        }
        // @codeCoverageIgnoreStart
        // Extra Windows path munging. This is tested via AppVeyor, but code
        // coverage is not reported.

        // Handle relative paths with drive letters. c:file.txt.
        while (preg_match('#^[a-zA-Z]{1}:[^\\\/]#', $basename)) {
            $basename = substr($basename, 2);
        }

        // Remove colon for standalone drive letter names.
        if (preg_match('#^[a-zA-Z]{1}:$#', $basename)) {
            $basename = rtrim($basename, ':');
        }

        return $basename;
        // @codeCoverageIgnoreEnd
    }
19022
public static function getKnownLanguages($basePath = JPATH_ROOT)
	{
		$dir = self::getLanguagePath($basePath);
		$knownLanguages = self::parseLanguageFiles($dir);

		return $knownLanguages;
	}
490485
private function normalizeMetadata(array $metaData, string $basePath): array
    {
        if (empty($basePath)) {
            $basePath = '.';
        }

        if (empty($metaData['path'])) {
            $metaData['path'] = '.';
        }

        if (empty($metaData['type'])) {
            $metaData['type'] = 'dir';
        }

        if ($metaData['path'] == $basePath) {
            if ('file' == $metaData['type']) {
                $parts = explode('/', $metaData['path']);
                $metaData['path'] = array_pop($parts);
            } else {
                $metaData['path'] = '.';
            }
        } elseif ('.' != $basePath) {
            $metaData['path'] = substr($metaData['path'], strlen($basePath) + 1);
        }

        if (isset($metaData['size'])) {
            $metaData['size'] = $this->humanFileSize($metaData['size']);
        } else {
            $metaData['size'] = '';
        }

        return $metaData;
    }
477377
public function defaults($basePath = null)
    {
        $defaults = [];
        foreach ($this->_columns as $key => $value) {
            if ($basePath) {
                $fieldName = strpos($key, $basePath . '.') === 0 ? substr($key, strlen($basePath) + 1) : null;
            } else {
                $fieldName = $key;
            }
            if (!$fieldName || $fieldName === '*' || strpos($fieldName, '.') !== false) {
                continue;
            }
            if (isset($value['default'])) {
                $defaults[$fieldName] = $value['default'];
            }
        }
        return $defaults;
    }
951220
public static function getKnownLanguages($basePath = PATH_APP)
	{
		$dir = self::getLanguagePath($basePath);
		$knownLanguages = self::parseLanguageFiles($dir);

		return $knownLanguages;
	}
1352344
public function getMinifyUrl($paths, $basePath = null)
    {
        return $this->container->get('rednose_combo_handler.templating.helper.minify')->getUrl($paths, $basePath);
    }