Get path from extension name.

@param  string  $name

@return array
185826
protected function getPathFromExtensionName(string $name): array
    {
        $extension = $this->app->make('orchestra.extension');
        $finder = $this->app->make('orchestra.extension.finder');

        if ($name === 'app') {
            $basePath = $sourcePath = $this->app->basePath();
        } else {
            $basePath = $finder->resolveExtensionPath(rtrim($extension->option($name, 'path'), '/'));
            $sourcePath = $finder->resolveExtensionPath(rtrim($extension->option($name, 'source-path'), '/'));
        }

        return [$basePath, $sourcePath];
    }
1183264
public function getExtension(string $name)
    {
        return isset($this->extensions[$name]) ? $this->extensions[$name] : null;
    }
1144733
protected function getResourcePrefix($name)
	{
		$segments = explode('/', $name);

		// To get the prefix, we will take all of the name segments and implode them on
		// a slash. This will generate a proper URI prefix for us. Then we take this
		// last segment, which will be considered the final resources name we use.
		$prefix = implode('/', array_slice($segments, 0, -1));

		return array($segments[count($segments) - 1], $prefix);
	}
1325517
private function parentPath($name)
    {
        $parts = $this->splitName($name);
        array_pop($parts);

        return implode('/', $parts);
    }
501699
private function getPath($name)
    {
        if (!isset($this->paths[$name])) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Unknown path segment name "%s", known paths are "%s"',
                    $name,
                    implode('", "', array_keys($this->paths))
                )
            );
        }

        $name = $this->paths[$name];

        return $name;
    }
1012697
public function getExtension($name)
    {
        if ($extension = $this->nearestForClass($name)) {
            return $extension;
        }

        throw new OutOfBoundsException(get_class($this).": No extension named \"$name\" found");
    }
887466
public function getPath($name)
    {
        if (!isset($this->config[$name]['prototype_path'])) {
            throw new \Exception(sprintf('Path for "%s" not found', $name));
        }

        return $this->config[$name]['prototype_path'];
    }
923975
public function findPublicPath($name)
    {
        $path = $this->prefixPublicPath($name);

        if ($this->files->exists($path))
        {
            return $path;
        }
    }
1172649
public function find($name)
    {

        if (strpos($name, '::') !== false) {
            return $this->findNamedPathView($name);
        }
        return $this->findInPaths($name, $this->paths);
    }
617774
public static function getPluginPath($name = null)
	{
		$path = Config::get()->get('plugin.path');
		if ($name != null) {
			$path = $path . '/' . $name;
		}
		return $path;
	}
194767
public function name(?string $name = null, ?bool $extension = false)
  {
    if ($name !== null) {
      $this->info['name'] = $name . ($extension ? '.' . pathinfo($this->info['name'], PATHINFO_EXTENSION) : '');
      return $this;
    }

    return $this->info['name'];
  }
281334
public function getExtension(
        /*# string */ $extensionName
    )/*# : ExtensionAbstract */ {
        if (!$this->hasExtension($extensionName)) {
            $this->addExtension(new $extensionName);
        }
        return $this->extensions[$extensionName];
    }
575259
protected function getRoutePath($name)
    {
        $routeName = str_replace_first('api.', '', $this->getRouteName($name));
        $routeNameExploded = explode('.', $routeName);
        $routePath = str_replace('.', '/', $routeName);
        if ($this->option('parent') && count($routeNameExploded) >= 2) {
            $routePath = str_replace_last('/', '.', $routePath);
        }
        return $routePath;
    }
178270
public static function extInfo($extensionName)
    {

        $result = self::_getExtension($extensionName);
        if ($result) {
            $extensionName = $result['name'];
        }

        return self::i()->dump($result, '! extension (' . $extensionName . ') !');
    }
611457
public function getExtensionConfig($name)
    {
        if (!isset($this->extensionConfigs[$name])) {
            $this->extensionConfigs[$name] = [];
        }

        return $this->extensionConfigs[$name];
    }
645484
public function quessByName(string $name)
    {
        return $this->first(function(ExtensionContract $extension) use($name) {
            $package = $extension->getPackageName();

            return (str_contains($package, 'module-')) ? $package === 'module-' . $name : $package === 'component-' . $name;
        });
    }
1157023
public function getExtensionConfigurationFromPath($path)
    {
        $extensionConfiguration = $this->getExtensionConfiguration();

        return (ArrayUtility::isValidPath($extensionConfiguration, $path, '.'))
            ? ArrayUtility::getValueByPath($extensionConfiguration, $path, '.')
            : null;
    }