src/Container.php
public function setMetaData(string $serviceName, string $key, array $values)
    {
        // make sure the service exists
        if (!$this->has($serviceName)) { 
            throw new UnknownServiceException('There is no service named "' . $serviceName . '" specified.'); 
        }

        // make sure all elements are arrays
        foreach($values as $value) 
        {
            if (!is_array($value)) {
                throw new ContainerException('Every meta data value must be an array. "' . gettype($value) . '" given.');
            }
        }

        // make sure the metadata key is allocated
        if (!isset($this->metadata[$key])) {
            $this->metadata[$key] = [];
        }

        // write
        $this->metadata[$key][$serviceName] = $values;
        $this->linkMetaService($serviceName, $key);
    }
public function setMetaData(string $serviceName, string $key, array $values)
    {
        // make sure the service exists
        if (!$this->has($serviceName)) { 
            throw new UnknownServiceException('There is no service named "' . $serviceName . '" specified.'); 
        }

        // make sure all elements are arrays
        foreach($values as $value) 
        {
            if (!is_array($value)) {
                throw new ContainerException('Every meta data value must be an array. "' . gettype($value) . '" given.');
            }
        }

        // make sure the metadata key is allocated
        if (!isset($this->metadata[$key])) {
            $this->metadata[$key] = [];
        }

        // write
        $this->metadata[$key][$serviceName] = $values;
        $this->linkMetaService($serviceName, $key);
    }
Set metadata for a specific service
This will override all meta data matching service and key.

@param string            $serviceName
@param string            $key
@param array             $values multidimensional array

@return void