Get an instance of direito_grupo_equipamento services facade.
161706
def create_direito_grupo_equipamento(self):
        """"""
        return DireitoGrupoEquipamento(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
78599
def create_usuario(self):
        """"""
        return Usuario(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
175495
private function loadServiceProvider()
    {
        \Tiga\Framework\Facade\Facade::setFacadeContainer($this);

        // Available Provider
        $providers = $this['config']->get('provider');

        $providers = array_unique($providers);

        foreach ($providers as $provider) {
            $instance = new $provider($this);
            $instance->register();
        }

        // Aliases
        $aliases = $this['config']->get('alias');

        $aliases = array_unique($aliases);

        $aliasMapper = \Tonjoo\Almari\AliasMapper::getInstance();

        $aliasMapper->classAlias($aliases);
    }
638350
def create_tipo_equipamento(self):
        """"""
        return TipoEquipamento(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
494476
protected function getServiceName(): string
    {
        return Inflector::pluralize(Inflector::tableize(substr($this->modelClass, strrpos($this->modelClass, '\\') + 1)));
    }
467424
public static function getOrCreate($groups)
    {
        $app = Facade::getFacadeApplication();
        /** @var $database \Concrete\Core\Database\Connection\Connection */
        $database = $app->make('database')->connection();
        $petID = $database->fetchColumn(
            'select petID from PermissionAccessEntityTypes
                      where petHandle = \'group_combination\''
        );
        $query = $database->createQueryBuilder();
        $query->select('pae.peID')->from('PermissionAccessEntities', 'pae');
        $i = 1;
        $query->where('petid = :entityTypeID')->setParameter('entityTypeID', $petID);
        foreach ($groups as $group) {
            $query
                ->leftJoin(
                    'pae',
                    'PermissionAccessEntityGroups',
                    'paeg' . $i,
                    'pae.peID = paeg' . $i . '.peID'
                )
                ->andWhere('paeg' . $i . '.gID = :group' . $i)
                ->setParameter('group' . $i, $group->getGroupID());
            $i++;
        }

        $peIDs = $query->execute()->fetchAll();
        $peID = 0;

        // Check for all the groups belonging to this AccessEntity.
        if (!empty($peIDs)) {
            foreach ($peIDs as $result) {
                $allGroups = $database->fetchColumn(
                    'select count(gID) from PermissionAccessEntityGroups
                              where peID = ' . $result['peID']
                );
                if ($allGroups == count($groups)) {
                    $peID = $result['peID'];
                    break;
                }
            }
        }
        // If the accessEntity doesnt exist, then create a new one.
        if (empty($peID)) {
            $database->insert('PermissionAccessEntities', ['petID' => $petID]);
            $peID = $database->lastInsertId();
            $app->make('config')->save(
                'concrete.misc.access_entity_updated',
                time()
            );
            foreach ($groups as $group) {
                $database->insert(
                    'PermissionAccessEntityGroups',
                    ['peID' => $peID, 'gID' => $group->getGroupID()]
                );
            }
        }

        return self::getByID($peID);
    }
532122
def request(self):
        '''
        
        '''
#        try:
        payment_v2_schema(self)
#        except MultipleInvalid as e:
#            raise PagSeguroPaymentValidationException(u'Erro na validação dos dados: %s' % e.msg)
        params = self._build_params()
#         logger.debug(u'Parametros da requisicao ao PagSeguro: %s' % params)
        req = requests.post(
            self.PAGSEGURO_API_URL,
            params=params,
            headers={
                'Content-Type':
                'application/x-www-form-urlencoded; charset=ISO-8859-1'
            }
        )
        if req.status_code == 200:
            self.params = params
            self.response = self._process_response_xml(req.text)
        else:
            raise PagSeguroApiException(
                u'Erro ao fazer request para a API:' +
                ' HTTP Status=%s - Response: %s' % (req.status_code, req.text))
        return
371531
protected function getGroupAndSortingDefinition()
    {
        /** @var Contao2BackendViewDefinitionInterface $view */
        $view = $this->getEnvironment()
            ->getDataDefinition()
            ->getDefinition(Contao2BackendViewDefinitionInterface::NAME);

        return $view
            ->getListingConfig()
            ->getGroupAndSortingDefinition();
    }
672125
public function build(): GetRealtimeDataRequest
	{
		$instance = new GetRealtimeDataRequest();
		if ($this->contextId === null) {
			throw new BuilderException('Property [contextId] is required.');
		}
		$instance->contextId = $this->contextId;
		return $instance;
	}
247172
public function build(): ResolveAnimationRequest
	{
		$instance = new ResolveAnimationRequest();
		if ($this->animationId === null) {
			throw new BuilderException('Property [animationId] is required.');
		}
		$instance->animationId = $this->animationId;
		return $instance;
	}
1166945
protected function getClassService()
    {
        if (is_null($this->service)) {
            $this->service = TemplateAssemblyService::singleton();
        }
        return $this->service;
    }
873201
protected function getConfigIO()
    {
        return $this->getPrototype(
            $this->ioServiceClass,
            ['umi\config\io\IConfigIO']
        )
            ->createSingleInstance([$this->getReader(), $this->getWriter(), $this->aliases]);
    }
1251118
public static function getInstance(AnConfigInterface $config, AnServiceInterface $container)
    {
        if (!$container->has($config->service_identifier)) {
            $identifier = self::_identifier($config->service_identifier);
            $instance = AnDomain::getRepository($identifier, $config->toArray());
            $container->set($config->service_identifier, $instance);
        }

        return $container->get($config->service_identifier);
    }
1294228
public static function getInstance(AnConfigInterface $config, AnServiceInterface $container)
    {
        if (!$container->has($config->service_identifier)) {
            $registry = $container->get('application.registry', array('key' => $config->service_identifier));

            if (!$registry->offsetExists('aggregations')) {
                $components = $container->get('repos:components.component')->fetchSet();

                $dispatcher = $container->get('anahita:event.dispatcher');
                $components->registerEventDispatcher($dispatcher);

                $aggregations = new AnConfig();
                $event = new AnEvent(array('aggregations' => $aggregations));

                $dispatcher->dispatchEvent('onStoryAggregation', $event);
                $registry->offsetSet('aggregations', $aggregations);
            }

            $container->set($config->service_identifier, $registry->offsetGet('aggregations'));
        }

        return $container->get($config->service_identifier);
    }
1263247
public function getAuthenticationService()
    {
        $controller = $this->getController();
        $service = $controller->request->getAttribute('authentication');
        if ($service === null) {
            throw new Exception('The request object does not contain the required `authentication` attribute');
        }

        if (!($service instanceof AuthenticationServiceInterface)) {
            throw new Exception('Authentication service does not implement ' . AuthenticationServiceInterface::class);
        }

        return $service;
    }
1063127
public function build(): GetResourceContentRequest
	{
		$instance = new GetResourceContentRequest();
		if ($this->frameId === null) {
			throw new BuilderException('Property [frameId] is required.');
		}
		$instance->frameId = $this->frameId;
		if ($this->url === null) {
			throw new BuilderException('Property [url] is required.');
		}
		$instance->url = $this->url;
		return $instance;
	}
28695
def build(self):
        """"""
        from ambry.orm.config import BuildConfigGroupAccessor

        # It is a lightweight object, so no need to cache
        return BuildConfigGroupAccessor(self.dataset, 'buildstate', self._session)