src/Container.php
public function getServiceIds()
    {
        $services  = [];
        $reserved  = ['get', 'getParameter', 'getServiceIds', 'getReturnType'];
        $container = new \ReflectionClass($this);

        foreach ($this->factories as $name => $factory) {
            $services[] = self::underscore($name);
        }

        foreach ($container->getMethods() as $method) {
            if (!in_array($method->name, $reserved) && preg_match('/^get(.+)$/', $method->name, $match)) {
                $services[] = self::underscore($match[1]);
            }
        }

        sort($services);

        return $services;
    }
public function getServiceIds()
    {
        $services  = [];
        $reserved  = ['get', 'getParameter', 'getServiceIds', 'getReturnType'];
        $container = new \ReflectionClass($this);

        foreach ($this->factories as $name => $factory) {
            $services[] = self::underscore($name);
        }

        foreach ($container->getMethods() as $method) {
            if (!in_array($method->name, $reserved) && preg_match('/^get(.+)$/', $method->name, $match)) {
                $services[] = self::underscore($match[1]);
            }
        }

        sort($services);

        return $services;
    }
Returns all available service ids of this container

@return array
@throws \ReflectionException