Add the current workspace name as a tag for the route cache entry

@Flow\Around("method(Neos\Flow\Mvc\Routing\RouterCachingService->generateRouteTags())")
@param JoinPointInterface $joinPoint The current join point
@return array
493944
public function addWorkspaceName(JoinPointInterface $joinPoint)
    {
        $tags = $joinPoint->getAdviceChain()->proceed($joinPoint);

        $values = $joinPoint->getMethodArgument('routeValues');

        if (isset($values['node']) && strpos($values['node'], '@') !== false) {
            // Build context explicitly without authorization checks because the security context isn't available yet
            // anyway and any Entity Privilege targeted on Workspace would fail at this point:
            $this->securityContext->withoutAuthorizationChecks(function () use ($values, &$tags) {
                $contextPathPieces = NodePaths::explodeContextPath($values['node']);
                $tags[] = $contextPathPieces['workspaceName'];
            });
        }
        return $tags;
    }
1030749
protected function getEntryFileLocations(PackageInterface $package)
    {
        $muPluginsDir = dirname($this->composer->getInstallationManager()->getInstallPath($package));

        return array_reduce(
            $this->getPackageEntryPoints($package),
            function ($locations, $entryPoint) use ($muPluginsDir) {
                $locations[ $entryPoint ] =  $muPluginsDir . DIRECTORY_SEPARATOR . basename($entryPoint);

                return $locations;
            },
            []
        );
    }
1193290
public function getJoinEntityValue($joinEntity)
    {
        return empty($this->joinPropertyPath)
            ? (string) $joinEntity
            : $this->accessor->getValue($joinEntity, $this->joinPropertyPath);
    }
929771
public function parseLock(AroundJoinPoint $joinPoint)
    {
        $class = get_parent_class($joinPoint->getTarget());
        // Lockable 注解
        $lockable = AnnotationManager::getMethodAnnotations($class, $joinPoint->getMethod(), Lockable::class)[0] ?? null;
        return $this->parseLockable($joinPoint->getTarget(), $joinPoint->getMethod(), $joinPoint->getArgs(), $lockable, function() use($joinPoint){
            return $joinPoint->proceed();
        });
    }
900315
public function validateConstruct(JoinPoint $joinPoint)
    {
        $className = BeanFactory::getObjectClass($joinPoint->getTarget());

        $annotations = AnnotationManager::getClassAnnotations($className);
        $propertyAnnotations = AnnotationManager::getPropertiesAnnotations($className);

        foreach($propertyAnnotations as $propertyName => $tAnnotations)
        {
            foreach($tAnnotations as $annotation)
            {
                $annotation = clone $annotation;
                $annotation->name = $propertyName;
                $annotations[] = $annotation;
            }
        }

        if(isset($annotations[0]))
        {
            $data = [];
            foreach($joinPoint->getTarget() as $name => $value)
            {
                $data[$name] = $value;
            }

            $validator = new Validator($data, $annotations);
            if(!$validator->validate())
            {
                $rule = $validator->getFailRule();
                $exception = $rule->exception;
                throw new $exception(sprintf('%s:__construct() Parameter verification is incorrect: %s', $className, $validator->getMessage()), $rule->exCode);
            }
        }
        else
        {
            $data = null;
        }
    }
418200
protected function createEndpoints(ContainerInterface $container, array $aliases): array
    {
        $result = [];
        foreach ($aliases as $alias) {
            $result[] = $container->get($alias);
        }
        return $result;
    }
68438
public static function getJoinPoint(
        string $className,
        string $joinPointType,
        string $methodName,
        array $advices
    ): MethodInvocation {
        static $accessor;

        if ($accessor === null) {
            $aspectKernel = AspectKernel::getInstance();
            $accessor     = $aspectKernel->getContainer()->get('aspect.advisor.accessor');
        }

        $filledAdvices = [];
        foreach ($advices as $advisorName) {
            $filledAdvices[] = $accessor->$advisorName;
        }

        $joinPoint = new self::$invocationClassMap[$joinPointType]($className, $methodName . '➩', $filledAdvices);

        return $joinPoint;
    }
548561
public function generateUriForNode(ActionRequest $request, JoinPointInterface $joinPoint, NodeInterface $node)
    {
        // store original node path to restore it after generating the uri
        $originalNodePath = $request->getMainRequest()->getArgument('node');

        // generate the uri for the given node
        $request->getMainRequest()->setArgument('node', $node->getContextPath());
        $result = $joinPoint->getAdviceChain()->proceed($joinPoint);

        // restore the original node path
        $request->getMainRequest()->setArgument('node', $originalNodePath);

        return $result;
    }
1102325
public function join(Join $join)
    {
        $takenAliases = $this->getTakenAliases();

        if (in_array($join->getAlias(), $takenAliases, true)) {
            throw InvalidArgumentException::format(
                'Invalid join supplied to %s::%s: alias \'%s\' is already taken, taken aliases are (%s)',
                get_class($this), __FUNCTION__, $join->getAlias(), Debug::formatValues($takenAliases)
            );
        }


        $this->joins[] = $join;

        return $this;
    }
622702
public function addCacheHash(JoinPointInterface $joinPoint)
    {
        $result = $joinPoint->getAdviceChain()->proceed($joinPoint);

        $packageKey = $joinPoint->getMethodArgument('packageKey');
        $relativePathAndFilename = $joinPoint->getMethodArgument('relativePathAndFilename');

        return $this->getModifiedResourceUri($result, $relativePathAndFilename, $packageKey);
    }
283876
protected function buildDataJoinsMany(ConfigInterface $config, array $joinKeys)
    {
        //~ Search for keys
        $keys = '';
        $joinKeys = array_flip($joinKeys);
        foreach ($this->columns as $column) {
            if (!isset($joinKeys[$column->getName()])) {
                continue;
            }

            $keys .= '
            $mapper->addWhere(\'' . $column->getName() . '\', $this->' . $column->getMethodNameGet() .'());';
        }

        if (empty($keys)) {
            throw new \LogicException('Empty keys list for join all method !');
        }

        $propertyCacheName = 'joinManyCache' . $config->getClassname();
        $this->vars['properties'] .= '

    /**
     * @var ' . $config->getClassname() . '[] $' . $propertyCacheName . '
     */
     protected $' . $propertyCacheName . ' = null;';

        //~ Generate method
        return '
    /**
     * Get list of ' . $config->getClassname() . ' data objects.
     *
     * @param  bool $isForceReload
     * @return ' . $config->getClassname() . '[]
     */
    public function getAll' . $config->getClassname() . '($isForceReload = false)
    {
        if ($isForceReload || null === $this->' . $propertyCacheName . ') {
            $mapper = new ' . $config->getClassname() . 'Mapper($this->dependencyContainer->getDatabase(\'' . $config->getDbConfig() . '\'));' .
            $keys . '

            $this->' . $propertyCacheName . ' = $mapper->select();
        }
        
        return $this->' . $propertyCacheName . ';
    }
';
    }
356230
protected function joinColumnToArray(ORM\JoinColumn $joinColumnAnnotation, $propertyName = null)
    {
        return [
            'name' => $joinColumnAnnotation->name === null ? $propertyName : $joinColumnAnnotation->name,
            'unique' => $joinColumnAnnotation->unique,
            'nullable' => $joinColumnAnnotation->nullable,
            'onDelete' => $joinColumnAnnotation->onDelete,
            'columnDefinition' => $joinColumnAnnotation->columnDefinition,
            'referencedColumnName' => $joinColumnAnnotation->referencedColumnName,
        ];
    }
891493
protected function generateSwagger(
        string $namespace,
        int $version,
        string $service = null,
        string $method = null
    ) : array {
        $this->listServices($namespace, $version, $service);
        $return = $this->getContainer($namespace, $version);

        foreach (self::$servicesList as $serviceName => $service) {
            list($path, $defintions) = $this->generateSwaggerForService($serviceName, $service, $method);
            $return['paths'] = array_merge($return['paths'], $path);
            $return['definitions'] = array_merge($return['definitions'], $defintions);
        }

        return $return;
    }
60688
public function validateMethod(AroundJoinPoint $joinPoint)
    {
        $className = BeanFactory::getObjectClass($joinPoint->getTarget());
        $methodName = $joinPoint->getMethod();

        $annotations = AnnotationManager::getMethodAnnotations($className, $methodName);
        if(isset($annotations[0]))
        {
            $data = ClassObject::convertArgsToKV($className, $methodName, $joinPoint->getArgs());
            $data['$this'] = $joinPoint->getTarget();

            $validator = new Validator($data, $annotations);
            if(!$validator->validate())
            {
                $rule = $validator->getFailRule();
                $exception = $rule->exception;
                throw new $exception($validator->getMessage(), $rule->exCode);
            }

            unset($data['$this']);
            $data = array_values($data);
        }
        else
        {
            $data = null;
        }

        return $joinPoint->proceed($data);
    }
427838
public function parseCachePut(AroundJoinPoint $joinPoint)
    {
        $methodReturn = $joinPoint->proceed();

        $class = get_parent_class($joinPoint->getTarget());

        // CachePut 注解列表
        $cachePuts = AnnotationManager::getMethodAnnotations($class, $joinPoint->getMethod(), CachePut::class);

        // 方法参数
        $args = ClassObject::convertArgsToKV($class, $joinPoint->getMethod(), $joinPoint->getArgs());

        foreach($cachePuts as $cachePut)
        {
            // 缓存名
            $name = $cachePut->name;
            if(null === $name)
            {
                $name = Config::get('@currentServer.cache.default');
                if(null === $name)
                {
                    throw new \RuntimeException('config "cache.default" not found');
                }
            }

            // 键
            $key = $this->getKey($joinPoint, $args, $cachePut);
            $cacheInstance = CacheManager::getInstance($name);

            $cacheInstance->set($key, $this->getValue($cachePut, $methodReturn), $cachePut->ttl);
        }

        return $methodReturn;
    }
47748
public function logStart(JoinPointInterface $joinPoint)
    {
        $session = $joinPoint->getProxy();
        if ($session->isStarted()) {
            $this->logger->info(sprintf('%s: Started session with id %s.', $this->getClassName($joinPoint), $session->getId()), [
                'packageKey' => 'Neos.Flow',
                'className' => $joinPoint->getClassName(),
                'methodName' => $joinPoint->getMethodName()
            ]);
        }
    }
295420
public function buildJunctionJoinColumnName(\ReflectionClass $targetClass, string $targetIdPropertyName, 
			string $joinColumnName = null): string {
		if ($joinColumnName !== null) return $joinColumnName;
		
		return StringUtils::hyphenated($targetClass->getShortName() . ucfirst($targetIdPropertyName));
	}