Returns all the available services.

@return ServiceInterface[]
772300
public function getAllServices()
    {
        $result = array();
        foreach ($this->getExtensions() as $handle) {
            $result[$handle] = $this->getService($handle);
        }

        return $result;
    }
1062371
public function providers()
    {
        return collect($this->getManifest())->flatMap(function ($configuration) {
            return (array) ($configuration['providers'] ? $configuration['providers'] : []);
        })->filter()->all();
    }
5972
protected function getCommonService() {
		if ($this->service === null) {
			if ($this->arguments === null) {
				$this->service = $this->initService();
			} else {
				$args = $this->normalizeArgs($this->arguments);
				$args = $this->processArgs($args);
				
				$this->service = $this->initService($args);
			}
		}
		
		return $this->service;
	}
8210
public function requiredPorts()
    {
        $ports = [];

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

            if ($instance instanceof ServiceInterface) {
                $ports = array_merge($ports, $instance->getHostPorts());
            }
        }
        $ports = array_unique($ports);

        return array_values($ports);
    }
157029
protected function getServiceNames()
    {
        $names = [];

        foreach ($this->getServices() as $name => $info) {
            if (!isset($info['type'])) {
                continue;
            }
            $names[$name] = $info['type'];
        }

        return $names;
    }
1203266
private function getService()
    {
        if ($this->myService === null) {
            $curlOptions = [
                'url'          => $this->serviceUrl,
                'sslCert'      => $this->clientCertPath,
                'sslKey'       => $this->clientKeyPath,
                'sslKeyPasswd' => $this->clientKeyPassPhrase,
                'caInfo'       => $this->serverCert
            ];
            $this->myService = new OrderService($curlOptions, $this->apiUser, $this->apiPass, $this->debug);
        }

        return $this->myService;
    }
635487
public function getStatisticsServices():array
    {

        $services = $this->getAllServices();
        $counter = 0;
        $senable = 0;

        foreach ($services as $val) {
            if ($val->status == "enabled") {
                $senable++;
            }

            $counter++;
        }

        return (array("number" => $counter, "enabled" => $senable));
    }
1004636
public function actionServices()
    {
        $this->checkAccess('services');
        
        $settings = [];
        $apiEndpoint = $this->model->ngRestApiEndpoint();
        $userSortSettings = Yii::$app->adminuser->identity->setting->get('ngrestorder.admin/'.$apiEndpoint, false);
        
        if ($userSortSettings && is_array($userSortSettings)) {
            if ($userSortSettings['sort'] == SORT_DESC) {
                $order = '-'.$userSortSettings['field'];
            } else {
                $order = '+'.$userSortSettings['field'];
            }
            
            $settings['order'] = $order;
        }
        
        $userFilter = Yii::$app->adminuser->identity->setting->get('ngrestfilter.admin/'.$apiEndpoint, false);
        if ($userFilter) {
            $settings['filterName'] = $userFilter;
        }
        
        $modelClass = $this->modelClass;

        // check if taggable exists, if yes return all used tags for the 
        if (ObjectHelper::isTraitInstanceOf($this->model, TaggableTrait::class)) {
            $tags = $this->model->findTags();
        } else {
            $tags = false;
        }

        return [
            'service' => $this->model->getNgRestServices(),
            '_tags' => $tags,
            '_hints' => $this->model->attributeHints(),
            '_settings' => $settings,
            '_locked' => [
                'data' => UserOnline::find()->select(['lock_pk', 'last_timestamp', 'u.firstname', 'u.lastname', 'u.id'])->joinWith('user as u')->where(['lock_table' => $modelClass::tableName()])->createCommand()->queryAll(),
                'userId' => Yii::$app->adminuser->id,
            ],
        ];
    }
230495
public function getServiceConfig()
    {
        return array(
            'aliases' => array(
                'dlccategory_doctrine_em' => 'doctrine.entitymanager.orm_default',
            ),
            
            'invokables' => array(
                'dlccategory_category_mapper'   => 'DlcCategory\Mapper\Category',
                'dlccategory_category_service'  => 'DlcCategory\Service\Category',
                'dlccategory_setup_service'     => 'DlcCategory\Service\Setup',
            ),
            
            'factories' => array(
                
                'dlccategory_category_hydrator' => function ($sm) {
                    $objectManager = $sm->get('dlccategory_doctrine_em');
                    $options       = $sm->get('dlccategory_module_options');
                    $hydrator      = new \DoctrineModule\Stdlib\Hydrator\DoctrineObject(
                            $objectManager,
                            $options->getCategoryEntityClass()
                    );
                    
                    return $hydrator;
                },
                
                'dlccategory_addcategory_form' => function ($sm) {
                    $form = new \DlcCategory\Form\AddCategory();
                    $form->setServiceLocator($sm);
                    $form->init();
                    return $form;
                },
                
                'dlccategory_editcategory_form' => function ($sm) {
                    $form = new \DlcCategory\Form\EditCategory();
                    $form->setServiceLocator($sm);
                    $form->init();
                    return $form;
                },
            
                'dlccategory_module_options' => function ($sm) {
                    $config = $sm->get('Config');
                    return new Options\ModuleOptions(isset($config['dlccategory_module_options']) ? $config['dlccategory_module_options'] : array());
                },
                
                'dlccategory_nestedset_config' => function ($sm) {
                    $em = $sm->get('dlccategory_doctrine_em');
                    $options = $sm->get('dlccategory_module_options');
                    
                    $config = new \DoctrineExtensions\NestedSet\Config($em, $options->getCategoryEntityClass());
                    return $config;
                },
                
                'dlccategory_nestedset_manager' => function ($sm) {
                    $manager = new \DoctrineExtensions\NestedSet\Manager($sm->get('dlccategory_nestedset_config'));
                    return $manager;
                },
            ),
        );
    }
256315
def available_services():
    
    all_datas = ()
    data = ()

    for class_path in settings.TH_SERVICES:
        class_name = class_path.rsplit('.', 1)[1]
        # 2nd array position contains the name of the service
        data = (class_name, class_name.rsplit('Service', 1)[1])
        all_datas = (data,) + all_datas
    return all_datas
743791
public function getServices()
    {
        $mergedModuleServices = array();

        foreach ($this->services as $services) {
            $mergedModuleServices = ArrayUtils::merge($mergedModuleServices, $services);
        }

        return $mergedModuleServices;
    }
1270168
public function getAll(): array
    {
        return \array_merge(
            $this->interfaces,
            $this->traits,
            $this->abstractClasses,
            $this->classes
        );
    }
454284
def get_services(self):
        
        self.__load_System_class()
        pid = self.get_pid()
        return [d for d in System.get_active_services() if d.ProcessId == pid]
907393
def services(self):
        
        if self._services is None:
            self._services = ServiceList(self)
        return self._services
1103920
public function getList()
    {
        /** @var RcmUserService $rcmUserService */
        $rcmUserService = $this->serviceLocator->get(RcmUserService::class);

        //ACCESS CHECK
        if (!$rcmUserService->isAllowed(
            ResourceName::RESOURCE_SITES,
            'admin'
        )
        ) {
            $this->getResponse()->setStatusCode(Response::STATUS_CODE_401);
            return $this->getResponse();
        }

        $themes = $this->getThemesConfig();

        return new ApiJsonModel($themes, 0, 'Success');
    }
409238
protected function getZendServiceManager()
    {
        if (is_null($this->services)) {
            $options = $this->getOptions();
            $options['services']['search.options']['model'] = $this->model;
            $config         = new Config($options);
            $this->services =  new ServiceManager($config);
        }
        return $this->services;
    }
1291530
public function listServiceNamesOptionsAll() {
    $service_data = $this->loadServiceData();

    $return = array();
    foreach ($service_data['all'] as $service_id => $service_info) {
      $return[$service_id] = $service_info['label'];
    }

    return $return;
  }