protected function getServiceContextFromAnnotation(ServiceContext $service): ContainerContextService
    {
        $containerService = new ContainerContextService();

        $containerService
            ->setContextClass($service->getContextClass())
            ->setContextProperty($service->getContextProperty())
            ->setContextMethod($service->getContextMethod())
            ->setContextFunction($service->getContextFunction())
            ->setDefaults($service->getDefaults())
            ->setSingleton($service->isSingleton())
            ->setId($service->getId())
            ->setName($service->getName())
            ->setClass($service->getClass())
            ->setProperty($service->getProperty())
            ->setMethod($service->getMethod())
            ->setStatic($service->isStatic())
            ->setFunction($service->getFunction())
            ->setMatches($service->getMatches())
            ->setDependencies($service->getDependencies())
            ->setArguments($service->getArguments());

        return $containerService;
    }
protected function getServiceContextFromAnnotation(ServiceContext $service): ContainerContextService
    {
        $containerService = new ContainerContextService();

        $containerService
            ->setContextClass($service->getContextClass())
            ->setContextProperty($service->getContextProperty())
            ->setContextMethod($service->getContextMethod())
            ->setContextFunction($service->getContextFunction())
            ->setDefaults($service->getDefaults())
            ->setSingleton($service->isSingleton())
            ->setId($service->getId())
            ->setName($service->getName())
            ->setClass($service->getClass())
            ->setProperty($service->getProperty())
            ->setMethod($service->getMethod())
            ->setStatic($service->isStatic())
            ->setFunction($service->getFunction())
            ->setMatches($service->getMatches())
            ->setDependencies($service->getDependencies())
            ->setArguments($service->getArguments());

        return $containerService;
    }
protected function getServiceContextFromAnnotation ( ServiceContext $ service ) : ContainerContextService { $ containerService = new ContainerContextService ( ) ; $ containerService -> setContextClass ( $ service -> getContextClass ( ) ) -> setContextProperty ( $ service -> getContextProperty ( ) ) -> setContextMethod ( $ service -> getContextMethod ( ) ) -> setContextFunction ( $ service -> getContextFunction ( ) ) -> setDefaults ( $ service -> getDefaults ( ) ) -> setSingleton ( $ service -> isSingleton ( ) ) -> setId ( $ service -> getId ( ) ) -> setName ( $ service -> getName ( ) ) -> setClass ( $ service -> getClass ( ) ) -> setProperty ( $ service -> getProperty ( ) ) -> setMethod ( $ service -> getMethod ( ) ) -> setStatic ( $ service -> isStatic ( ) ) -> setFunction ( $ service -> getFunction ( ) ) -> setMatches ( $ service -> getMatches ( ) ) -> setDependencies ( $ service -> getDependencies ( ) ) -> setArguments ( $ service -> getArguments ( ) ) ; return $ containerService ; }
Get a service context from a service context annotation.

@param ServiceContext $service The service context annotation

@return \Valkyrja\Container\ServiceContext
Get a service context from a service context annotation .