Retrieve cache file name for given module name, controller name and action name
@return string
6741
public function getCacheFileName()
    {
        $aAssets = $this->getAssets();

        $sCacheFileName = isset($aAssets[$sModuleName = $this->getModuleName()]) ? $sModuleName : \AssetsBundle\Service\ServiceOptions::NO_MODULE;

        $aUnwantedKeys = array(
            \AssetsBundle\AssetFile\AssetFile::ASSET_CSS => true,
            \AssetsBundle\AssetFile\AssetFile::ASSET_LESS => true,
            \AssetsBundle\AssetFile\AssetFile::ASSET_JS => true,
            \AssetsBundle\AssetFile\AssetFile::ASSET_MEDIA => true
        );
        $aAvailableModuleAssets = array_diff_key($aAssets, $aUnwantedKeys);
        $bControllerNameFound = false;
        $sControllerName = $this->getControllerName();
        foreach ($aAvailableModuleAssets as $aModuleConfig) {
            if (isset($aModuleConfig[$sControllerName])) {
                $bControllerNameFound = true;
                break;
            }
        }
        $sCacheFileName .= '_' . ($bControllerNameFound ? $sControllerName : \AssetsBundle\Service\ServiceOptions::NO_CONTROLLER);

        $bActionNameFound = false;
        $sActionName = $this->getActionName();
        reset($aAvailableModuleAssets);
        foreach ($aAvailableModuleAssets as $aModuleConfig) {
            foreach (array_diff_key($aModuleConfig, $aUnwantedKeys) as $aControllerConfig) {
                if (isset($aControllerConfig[$sActionName])) {
                    $bActionNameFound = true;
                }
            }
        }
        $sCacheFileName .= '_' . ($bActionNameFound ? $sActionName : \AssetsBundle\Service\ServiceOptions::NO_ACTION);
        return md5($sCacheFileName);
    }
1078705
public function _getDummyDataFileName(): string
	{
		$method = $this->used_method;
		$endp = str_replace([ '/', '.' ], [ '-', '' ], substr($this->endpoint, 1));
		$quer = str_replace([ '&', '%26', '=', '%3D' ], [ '_', '_', '-', '-' ], http_build_query($this->query_data));
		$data = !empty($this->post_data) ? '_' . md5(http_build_query($this->query_data)) : '';
		if (strlen($quer))
			$quer = "_" . $quer;

		return __DIR__ . "/../../tests/DummyData/{$method}_$endp$quer$data.json";
	}
116170
private static function caching($actionContext) {
        $cacheKey = InternalHelper::getPropertyValue($actionContext, 'cacheKey');

        // no key, no cache
        if (empty($cacheKey)) {
            return;
        }

        $cacheSettings = InternalHelper::getStaticPropertyValue('\\PhpMvc\\OutputCache', 'settings');
        $actionName = $actionContext->getActionName();
        $httpContext = $actionContext->getHttpContext();
        $response = $httpContext->getResponse();
        $cache = $httpContext->getCache();

        // cache duration
        if (!empty($cacheSettings[$actionName]['duration'])) {
            $duration = intval($cacheSettings[$actionName]['duration']);
        }
        elseif (!empty($cacheSettings['.']['duration'])) {
            $duration = intval($cacheSettings['.']['duration']);
        }
        else {
            $duration = 0;
        }

        // TODO: regionName
        $regionName = null;

        $dataToCache = array();

        // add response to cache
        if (($cachePartSeq = $cache->get($cacheKey . '_part_seq')) === null) {
            $dataToCache['statusCode'] = $response->getStatusCode();
            $dataToCache['statusDescription'] = $response->getStatusDescription();
            $dataToCache['headers'] = $response->getHeaders();
            $dataToCache['cookies'] = $response->getCookies();
            $dataToCache['files'] = InternalHelper::getPropertyValue($response, 'files');
            $dataToCache['output'] = InternalHelper::getPropertyValue($response, 'output');
        }
        else {
            $dataToCache['statusCode'] = $response->getStatusCode();
            $dataToCache['statusDescription'] = $response->getStatusDescription();
            $dataToCache['headers'] = $response->getHeaders();
            $dataToCache['cookies'] = $response->getCookies();
            $dataToCache['files'] = array();
            $dataToCache['output'] = '';

            for ($i = 0; $i < $cachePartSeq; ++$i) {
                $part = $cache->get($cacheKey . '_part_' . $i);

                if ($part !== null) {
                    $dataToCache['output'] .= $part['output'];
                    $dataToCache['files'] = array_merge($dataToCache['files'], $part['files']);
                    $cache->remove($cacheKey . '_part_' . $i);
                }
            }

            $cache->remove($cacheKey . '_part_seq');
        }

        $cache->add($cacheKey, $dataToCache, $duration, $regionName);
    }
160688
private function getCached()
    {
        $syntax = "// Cached assets do not modify\r\nlet cache = [" . PHP_EOL;

        foreach ($this->getCachedFiles() as $file) {
            $syntax .= "'$file'," . PHP_EOL;
        }

        $syntax .= "];";

        return $syntax;
    }
194625
public function getCacheDir() {
    if (true === $this->_checkCacheDir()) {
      $filename = $this->getCache();
      $filename = preg_replace('/[^0-9a-z\.\_\-]/i', '', strtolower($filename));
      return $this->getCachePath() . $this->_getHash($filename) . $this->getExtension();
    }
  }
1238032
public function getTemplatePathAndFilename()
    {
        return $this->baseRenderingContext->getTemplatePaths()->resolveTemplateFileForControllerAndActionAndFormat($this->request->getControllerName(), $this->request->getControllerActionName(), $this->request->getFormat());
    }
825487
public function getCacheLocation()
    {
        $routingInfos = $this->getRouter()->getRoutingInformation();
        return ezpRestPrefixFilterInterface::getApiProviderName() .
            '/v' . ezpRestPrefixFilterInterface::getApiVersion() .
            '/' . str_replace( "\\", ".", $routingInfos->controllerClass ) .
            '/' . $routingInfos->action;
    }
37607
public function getControllersModules() : array {
		$result = self::$cached_modules[$this->controller_data['module_code']]['module_ids'];
		// filter
		foreach ($result as $k => $v) {
			// determine action
			$action = $this->method_code == 'Edit' ? 'Record_View' : 'List_View';
			if (!$this->can($action, $this->method_code, $k)) {
				unset($result[$k]);
			}
		}
		// sort
		return \Object\Data\Common::buildOptions($result, ['name' => 'name'], [], ['i18n' => true]);
	}
1096796
def get_module_name(self, path_args):
        """"""
        controller_prefix = self.controller_prefix
        cset = self.module_names
        module_name = controller_prefix
        mod_name = module_name
        while path_args:
            mod_name += "." + path_args[0]
            if mod_name in cset:
                module_name = mod_name
                path_args.pop(0)
            else:
                break

        return module_name, path_args
5870
public function getControllerName()
        {
            if (null === $this->_controller) {
                $this->_controller = $this->getParam($this->getControllerKey());
            }

            return $this->_controller;
        }
1160285
private function getControllerFiles($module, $namespace, $prefix, &$result)
    {
        $path = Yii::getAlias('@' . str_replace('\\', '/', $namespace), false);
        $token = "Get controllers from '$path'";
        Yii::beginProfile($token, __METHOD__);
        try {
            if (!is_dir($path)) {
                return;
            }
            foreach (scandir($path) as $file) {
                if ($file == '.' || $file == '..') {
                    continue;
                }
                if (is_dir($path . '/' . $file)) {
                    $this->getControllerFiles($module, $namespace . $file . '\\', $prefix . $file . '/', $result);
                } elseif (strcmp(substr($file, -14), 'Controller.php') === 0) {
                    $id = Inflector::camel2id(substr(basename($file), 0, -14));
                    $className = $namespace . Inflector::id2camel($id) . 'Controller';
                    if (strpos($className, '-') === false && class_exists($className) && is_subclass_of($className, 'yii\base\Controller')) {
                        $this->getControllerActions($className, $prefix . $id, $module, $result);
                    }
                }
            }
        } catch (\Exception $exc) {
            Yii::error($exc->getMessage(), __METHOD__);
        }
        Yii::endProfile($token, __METHOD__);
    }
1349799
private function getFilePath($controller = false, $action = false){
		$controller = $controller ?: $this->_controller;
		$action = $action ?: $this->_action;

		$cacheFileName = $this->generateFileName($controller, $action);

		$path = $this->getAssetsUrl() . DIRECTORY_SEPARATOR . $this->folder . DIRECTORY_SEPARATOR . $cacheFileName;

		return $path;
	}
1201781
protected String buildCacheName(Invocation inv, Controller controller) {
		CacheName cacheName = inv.getMethod().getAnnotation(CacheName.class);
		if (cacheName != null)
			return cacheName.value();
		cacheName = controller.getClass().getAnnotation(CacheName.class);
		return (cacheName != null) ? cacheName.value() : inv.getActionKey();
	}
1190592
public function getControllerShortName()
    {
        $relativeUrl = $this->request->getUri()->getPath();

        $rootUrl = parse_url(ROOT_URL);
        if (isset($rootUrl['path'])) {
            $rootUrlPath = $rootUrl['path'];
            $relativeUrl = str_replace(rtrim($rootUrlPath, '/'), '', $relativeUrl);
        }

        $parts = explode('/', trim($relativeUrl, '/'));
        if(count($parts) === 3){
            return $parts[1];
        }

        return null;
    }
120108
public function actionName() {
        $request = $this->stack->getCurrentRequest();
        if ($request instanceof Request) {
            $pattern = "#::([a-zA-Z]*)Action#";
            $matches = array();
            preg_match($pattern, $request->get('_controller'), $matches);
            if (isset($matches[1])) {
                return strtolower($matches[1]);
            }

            return '';
        }

        return '';
    }
695820
protected function getTemplateFile(string $action = null) : string
    {
        $path = '/controller/' . lcfirst($this->getControllerName()) . '/';

        return $path . ($action ? $action : $this->getActionName());
    }
573161
public function getControllerName()
    {
        if (empty($this->controller_name)) {
            $controller_class = get_class($this);

            if (($pos = strrpos($controller_class, '\\')) !== false) {
                $this->controller_name = substr($controller_class, $pos + 1);
            } else {
                $this->controller_name = $controller_class;
            }
        }

        return $this->controller_name;
    }