Gets the service identifier.

@return	AnServiceIdentifier
@see 	AnObjectServiceable
331730
final public function getIdentifier($identifier = null)
	{
		if(isset($identifier)) {
		    $result = $this->__service_container->getIdentifier($identifier);
		} else {
		    $result = $this->__service_identifier; 
		}
	    
	    return $result;
	}
1216573
private function addServices()
    {
        if (!$this->container->getDefinitions()) {
            return '';
        }

        $code = "services:\n";
        foreach ($this->container->getDefinitions() as $id => $definition) {
            $code .= $this->addService($id, $definition);
        }

        $aliases = $this->container->getAliases();
        foreach ($aliases as $alias => $id) {
            while (isset($aliases[(string) $id])) {
                $id = $aliases[(string) $id];
            }
            $code .= $this->addServiceAlias($alias, $id);
        }

        return $code;
    }
694020
@Nullable
  public String getServiceId() {
    String serviceId = getString(SERVICE_KEY);
    if (serviceId == null) {
      serviceId = getString(MODULE_KEY);
    }
    return serviceId;
  }
1194399
protected function getReplyServiceName()
    {
        return $this->nameSpace.
            self::NAME_SPACE_SEPARATOR.
            $this->getCurrentServiceName().
            self::NAME_SPACE_SEPARATOR.
            self::QUEUE_REPLY_SUFFIX.
            self::QUEUE_SUFFIX;
    }
85866
public function findPath(AnServiceIdentifier $identifier)
    {
        $path  = '';
        $parts = $identifier->path;

        $name  = array_shift($parts);
        $type  = $identifier->package;

        if (!empty($identifier->name)) {
            if (count($parts)) {
                $path    = array_shift($parts).
                $path   .= count($parts) ? '/'.implode('/', $parts) : '';
                $path   .= DS.strtolower($identifier->name);
            } else {
                $path  = strtolower($identifier->name);
            }
        }

        //Plugins can have their own folder
        if (is_file($identifier->basepath.'/plugins/'.$type.'/'.$path.'/'.$path.'.php')) {
            $path = $identifier->basepath.'/plugins/'.$type.'/'.$path.'/'.$path.'.php';
        } else {
            $path = $identifier->basepath.'/plugins/'.$type.'/'.$path.'.php';
        }

        return $path;
    }
839021
public function getUserIdentifier() {
        if (!isset($this->userIdentifier)) {
            $user = $this->getData(OntologyDeliveryExecution::PROPERTY_SUBJECT);
            $this->userIdentifier =  ($user instanceof core_kernel_classes_Resource) ? $user->getUri() : (string)$user;
        }
        return $this->userIdentifier;
    }
166308
public function findClass(AnServiceIdentifier $identifier)
    {
        $path = AnInflector::camelize(implode('_', $identifier->path));
        $classname = 'Com'.ucfirst($identifier->package).$path.ucfirst($identifier->name);
        $loader = $this->getService('anahita:loader');
        //Manually load the class to set the basepath
        if (!$loader->loadClass($classname, $identifier->basepath)) {
            //the default can be in either in the default folder
            //be a registered default class
            $classname = AnServiceClass::findDefaultClass($identifier);
            //hack
            if ($classname == 'AnDomainBehaviorDefault') {
                $classname = null;
            }
            if (!$classname) {
                $classname = $this->_findClass($identifier);
            }
        }

        return $classname;
    }
1350140
public static String getObjectId()
    {
        ServiceContext context = (ServiceContext) _localContext.get();

        if (context != null)
            return context._objectId;
        else
            return null;
    }
1050130
public function getIOService()
    {
        if (null === $this->ioService) {
            $this->ioService = new IOService(
                $this->client,
                $this->inputDispatcher,
                $this->outputVisitor,
                $this->requestParser
            );
        }

        return $this->ioService;
    }
2179
public function classIdentifier()
    {
        if ( $this->ClassIdentifier === null )
        {
            $object = $this->object();
            $this->ClassIdentifier = $object->contentClassIdentifier();
        }

        return $this->ClassIdentifier;
    }
677578
public function getService()
    {
        if (null === $this->service) {
            $class = explode('\\', get_class($this));
            $class = substr(end($class), 0, -10);
            $serviceKey = strtolower($this->getModuleNamespace() . '_' . $class . '_service');
            $this->setService($this->getServiceLocator()->get($serviceKey));
        }
        return $this->service;
    }
341499
public function getServiceUtil()
    {
        if ($this->serviceUtil) {
            return $this->serviceUtil;
        }

        $className = $this->getServiceUtilClassName();
        $r = new ReflectionClass($className);
        $instance = $r->newInstance();

        if (!$instance instanceof ServiceUtilInterface) {
            $errMsg = sprintf('Service util not implement %s', ServiceUtilInterface::class);
            throw new Exception\RuntimeException($errMsg);
        }
        $this->serviceUtil = $instance;

        return $this->serviceUtil;
    }
853782
public function getService()
    {
        $serviceNodes = $this->element->getElementsByTagName('service');
        if ($serviceNodes->length > 0) {
            return new ServiceNode($this->document, $serviceNodes->item(0));
        }
        return null;
    }
527639
protected function getOAuthServiceName()
    {
        $serviceName = $this->getPayloadData('service', $this->request->getParameter('service'));

        if (empty($serviceName)) {
            $state = $this->getPayloadData('state', $this->request->getParameter('state'));
            if (empty($state)) {
                $state = $this->getPayloadData('oauth_token', $this->request->getParameter('oauth_token'));
            }
            if (!empty($state)) {
                $key = BaseOAuthService::CACHE_KEY_PREFIX . $state;
                $serviceName = \Cache::pull($key);
            }
        }

        return $serviceName;
    }
626184
public function getObjectService()
    {
        if (!$this->objectService) {
            $this->objectService = $this->getServiceLocator()->get('playgroundflow_object_service');
        }
        return $this->objectService;
    }
792259
public function getIdentifier()
    {
        // Get identifier
        $identifier = $this->identifier;

        // If identifier must be obfuscated
        if (true === $this->useObfuscation()) {

            // Who is requesting (fingerprint client)
            $headers = getallheaders();

            // Get arguments
            $filter = ['USER-AGENT', 'ACCEPT', 'ACCEPT-LANGUAGE', 'ACCEPT-ENCODING'];

            foreach ($headers as $header => $value) {
                if (false === in_array(strtoupper($header), $filter)) {
                    unset($headers[$header]);
                }
            }

            $identifier = sha1(
                $identifier.
                $this->generateFingerprint(
                    $this->getClientIp(),
                    $headers
                )
            );
        }

        return $identifier;
    }
752761
public function getIdentifier() : ?int 
    {
        if ( ! $this->hasIdentifier()) {
            $this->setIdentifier($this->getDefaultIdentifier());
        }
        return $this->identifier;
    }