public function getServiceInstanceByInterface($interface)
    {
        foreach ($this->getServiceInstances() as $info) {
            if (!isset($info['instance'])) {
                continue;
            }
            $instance = $info['instance'];

            if ($instance instanceof $interface) {
                return $instance;
            }
        }

        return false;
    }