Get a SolrService

@param string $core Optional name of index class
@return SolrService|SolrService_Core
350657
public static function service($core = null)
    {
        $options = self::solr_options();

        if (!self::$service_singleton) {
            self::$service_singleton = Injector::inst()->create(
                $options['service'],
                $options['host'],
                $options['port'],
                $options['path']
            );
        }

        if ($core) {
            if (!isset(self::$service_core_singletons[$core])) {
                self::$service_core_singletons[$core] = self::$service_singleton->serviceForCore(
                    singleton($core)->getIndexName()
                );
            }

            return self::$service_core_singletons[$core];
        }
        return self::$service_singleton;
    }
1317099
public function get($id)
    {
        if (isset($this->resolved[$id])) {
            return $this->resolved[$id];
        }
        $definition = null;
        if (isset($this->definitions[$id])) {
            $definition = $this->definitions[$id];
        }
        foreach ($this->resolvers as &$resolver) {
            if (is_string($resolver)) {
                $resolver = new $resolver;
            }
            if (!$resolver->supports($id, $definition)) {
                continue;
            }
            $service = $resolver->resolve(
                $this,
                $id,
                $definition
            );
            if (false !== $service) {
                if (isset($this->extensions[$id]) && is_array($this->extensions[$id])) {
                    foreach ($this->extensions[$id] as $extension) {
                        $service = $extension($service, $this);
                    }
                }
                if (isset($this->shared[$id])) {
                    $this->resolved[$id] = $service;
                }
                return $service;
            }
        }

        throw new NotFoundException(
            sprintf('Service \'%s\' not found', $id)
        );
    }
1103790
protected function getClassService()
    {
        if (is_null($this->service)) {
            $this->service = DeliveryTemplateService::singleton();
        }
        return $this->service;
    }
802065
public function get($key)
    {
        $key = strtolower($key);

        if (!isset($this->services[$key])) {
            throw new \InvalidArgumentException('Service not found: ' . $key);
        }

        // Have we been here before?
        if (isset($this->loadedService[$key])) {
            return $this->loadedService[$key];
        }

        if (!$this->services[$key] instanceof Service) {
            $this->loadedService[$key] = $this->services[$key];

            return $this->loadedService[$key];
        }

        // It's a Service instance, lets do some extra stuff.
        if (!$this->services[$key]->hasClassName()) {
            throw new \Exception('Unable to find class name from definition: ' . $key);
        }

        $className = $this->services[$key]->getClassName();
        $instance  = new $className();

        if ($this->services[$key]->hasFactoryMethod()) {
            call_user_func($instance, $this->services[$key]->getFactoryMethod());
        }

        $this->loadedService[$key] = $instance;

        return $this->loadedService[$key];
    }
118391
public function getSearchService()
    {
        if ($this->searchService !== null) {
            return $this->searchService;
        }

        $this->searchService = new SearchService(
            $this,
            $this->searchHandler,
            $this->getDomainMapper(),
            $this->getPermissionCriterionResolver(),
            $this->backgroundIndexer,
            $this->serviceSettings['search']
        );

        return $this->searchService;
    }
903623
public function get($sku)
    {
        /** @var HandlerInterface $responseHandler */
        $responseHandler = $this->service()->get($this->baseUrlPath($sku));
        return $responseHandler;
    }
852319
public function getService($service)
    {
        $service = $this->mapServiceName($service);

        if (isset($this->services[$service])) {
            return $this->services[$service];
        }

        return $this->services[$service] = $this->createService($service);
    }
1058868
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;
    }
347638
final protected function get(string $component)
    {
        switch ($component) {
            case 'request':
                return (FrameworkCore::getRuntimeParameters())->request;
                break;
            case 'query':
                return (FrameworkCore::getRuntimeParameters())->query;
                break;
            case 'session':
                return (HttpSession::getInstance());
                break;
            case 'service':
                return (Services::getInstance());
                break;
            case 'locale':
                return (FEnv::get("app.locale.context"));
                break;
            default:
                throw new Server500(new \ArrayObject(array("explain" =>
                   "Cannot call component : Undefined component $component",
                   "solution" => "Call availables components")));
                break;
        }
    }
708113
public function get($key)
    {
        $key = $this->salted($key, $this->suffix);

        $cached = $this->cache->get($key);
        $code = $this->cache->getResultCode();

        if ($code === Memcached::RES_SUCCESS) {
            return $cached;

        } elseif ($code !== Memcached::RES_NOTFOUND) {
            $this->sendAlert('get', $key, $code);
        }

        return null;
    }
644355
private function getService(string $service)
    {
        if ($this->container instanceof ContainerInterface && $this->container->has($service)) {
            return $this->container->get($service);
        }

        return new $service();
    }
618008
public function getClient($path = '/solr')
    {
        $options = $this->options;
        $options = [
            'secure' => $options->isSecure(),
            'hostname' => $options->getHostname(),
            'port' => $options->getPort(),
            'path' => $path,
            'login' => $options->getUsername(),
            'password' => $options->getPassword(),
            'wt' => 'phps'
        ];
        $key = md5(implode(':', $options));
        
        if (!isset($this->clients[$key])) {
            $this->clients[$key] = new SolrClient($options);
        }

        return $this->clients[$key];
    }
537429
public function get($key)
	{
		if(array_key_exists($key, $this->scoped))
		{
			return $this->scoped[$key];
		}
	
		return $this->model->get($key, NULL);
	}
972285
public function get($key)
    {
        if (!$this->requireProvider("Getting key " . $key)) return false;

        return $this->cacheProvider->get($key);
    }
524942
protected function getCoreInstance($className)
    {
        $className = self::prepareClassName($className);

        switch ($className) {
            case '\\Zepi\\Turbo\\Backend\\VirtualModuleBackend':
                $path = $this->rootDirectory . '/data/modules.data';
                return new \Zepi\Turbo\Backend\FileObjectBackend($path);
                break;
            case '\\Zepi\\Turbo\\Backend\\VirtualHandlerBackend':
                $path = $this->rootDirectory . '/data/handlers.data';
                return new \Zepi\Turbo\Backend\FileObjectBackend($path);
                break;
            case '\\Zepi\\Turbo\\Backend\\VirtualRouteBackend':
                $path = $this->rootDirectory . '/data/routes.data';
                return new \Zepi\Turbo\Backend\FileObjectBackend($path);
                break;
            case '\\Zepi\\Turbo\\Backend\\VirtualDataSourceBackend':
                $path = $this->rootDirectory . '/data/data-sources.data';
                return new \Zepi\Turbo\Backend\FileObjectBackend($path);
                break;
            default:
                if (class_exists($className, true)) {
                    return new $className();
                } else {
                    throw new Exception('Class "' . $className . '" is not defined.');
                }
                break;
        }
    }
1049733
public function get($sClass)
    {
        if($this->sentryContainer != null && $this->sentryContainer->has($sClass))
        {
            return $this->sentryContainer->get($sClass);
        }
        return $this->coreContainer[$sClass];
    }
232817
public function getServer($key = null)
    {
        if ($key === null) {
            return $this->server;
        } else {
            return (isset($this->server[$key])) ? $this->server[$key] : null;
        }
    }