public function describe($serviceId)
    {
        $cache = $this->getCache();
        $cacheId = self::CACHE_ID_PREFIX . $serviceId;
        
        if ($cache && ($description = $this->getCache()->getItem($cacheId))) {
            return $description;
        }
        
        $loader = $this->getServiceLoader();
        $options = $loader->getServiceOptions($serviceId);
        
        $service = $loader->getServicePluginManager()->get($serviceId, $options, true, false);
        
        if (!$service) {
            return null;
        }
        
        $description = [];
        $description['id'] = $serviceId;
        $description['name'] = $loader->getServiceName($serviceId);
        
        if (!is_callable($service)) {
            $specs = $this->getAnnotationBuilder()->getServiceSpecification($service);
            $specs = $specs->getArrayCopy();
            $description = array_merge($specs, $description);
        }
        
        $reflectionClass = new ReflectionClass($service);
        
        // Convert associative 'operations' array into numeric array
        if (isset($description['operations'])) {
            $description['operations'] = $this->decorateOperations($reflectionClass, $description['operations']);
        }
        
        if ($cache) {
            $cache->setItem($cacheId, $description);
        }
        
        return $description;
    }
public function describe($serviceId)
    {
        $cache = $this->getCache();
        $cacheId = self::CACHE_ID_PREFIX . $serviceId;
        
        if ($cache && ($description = $this->getCache()->getItem($cacheId))) {
            return $description;
        }
        
        $loader = $this->getServiceLoader();
        $options = $loader->getServiceOptions($serviceId);
        
        $service = $loader->getServicePluginManager()->get($serviceId, $options, true, false);
        
        if (!$service) {
            return null;
        }
        
        $description = [];
        $description['id'] = $serviceId;
        $description['name'] = $loader->getServiceName($serviceId);
        
        if (!is_callable($service)) {
            $specs = $this->getAnnotationBuilder()->getServiceSpecification($service);
            $specs = $specs->getArrayCopy();
            $description = array_merge($specs, $description);
        }
        
        $reflectionClass = new ReflectionClass($service);
        
        // Convert associative 'operations' array into numeric array
        if (isset($description['operations'])) {
            $description['operations'] = $this->decorateOperations($reflectionClass, $description['operations']);
        }
        
        if ($cache) {
            $cache->setItem($cacheId, $description);
        }
        
        return $description;
    }
public function describe ( $ serviceId ) { $ cache = $ this -> getCache ( ) ; $ cacheId = self :: CACHE_ID_PREFIX . $ serviceId ; if ( $ cache && ( $ description = $ this -> getCache ( ) -> getItem ( $ cacheId ) ) ) { return $ description ; } $ loader = $ this -> getServiceLoader ( ) ; $ options = $ loader -> getServiceOptions ( $ serviceId ) ; $ service = $ loader -> getServicePluginManager ( ) -> get ( $ serviceId , $ options , true , false ) ; if ( ! $ service ) { return null ; } $ description = [ ] ; $ description [ 'id' ] = $ serviceId ; $ description [ 'name' ] = $ loader -> getServiceName ( $ serviceId ) ; if ( ! is_callable ( $ service ) ) { $ specs = $ this -> getAnnotationBuilder ( ) -> getServiceSpecification ( $ service ) ; $ specs = $ specs -> getArrayCopy ( ) ; $ description = array_merge ( $ specs , $ description ) ; } $ reflectionClass = new ReflectionClass ( $ service ) ; // Convert associative 'operations' array into numeric array if ( isset ( $ description [ 'operations' ] ) ) { $ description [ 'operations' ] = $ this -> decorateOperations ( $ reflectionClass , $ description [ 'operations' ] ) ; } if ( $ cache ) { $ cache -> setItem ( $ cacheId , $ description ) ; } return $ description ; }
Retrieve service description

@param string $serviceId Service ID

@ValuService\Context({"cli", "http", "http-get"})
Retrieve service description