获取SOA服务实例
@param $id
@return RPC
329879
static function getInstance($id = null)
    {
        $key = empty($id) ? 'default' : $id;
        if (Core::$enableCoroutine)
        {
            return new static($id);
        }
        if (empty(self::$_instances[$key]))
        {
            $object = new static($id);
        }
        else
        {
            $object = self::$_instances[$key];
        }
        return $object;
    }
379575
public function getNew(string $id)
    {
        $definition = $this->raw($id);

        if (is_callable($definition)) {
            $service = call_user_func($definition, $this);
        } else {
            $service = $definition;
        }

        if (isset($this->extensionQueues[$id])) {
            $service = $this->extensionQueues[$id]->getService($service);
        }

        return $service;
    }
1342161
public function viewAction($id)
    {
        /** @var BlockManager $manager */
        $manager = $this->get('opifer.content.block_manager');

        /** @var BlockInterface $block */
        $block = $manager->getRepository()->find($id);

        if (!$block) {
            throw $this->createNotFoundException();
        }

        $response = new Response();

        /** @var Environment $environment */
        $environment = $this->get('opifer.content.block_environment');
        $environment->setObject($block->getOwner());

        $service = $manager->getService($block);

        $response = $service->execute($block, $response, [
            'partial' => true,
            'environment' => $environment
        ]);

        return $response;
    }
312589
protected function getPayload($id)
    {
        $rawPayload = $this->getRedis()->hget($this->getRedisJobNamespace(), $id);

        return static::parsePayload($rawPayload);
    }
635401
public function getAction($id)
    {
        $find = function($id) {
            /** @var RoleInterface $role */
            $role = $this->getRoleRepository()->findRoleById($id);

            return $this->convertRole($role);
        };

        $view = $this->responseGetById($id, $find);

        return $this->handleView($view);
    }
1068909
public function readByChargifyId($id)
    {
        $service = $this->getService();

        $response      = $service->request('products/' . $id, 'GET');
        $responseArray = $this->getResponseArray($response);

        if (!$this->isError()) {
            $this->_data = $responseArray['product'];
        } else {
            $this->_data = array();
        }

        return $this;
    }
1265431
public function show($id)
    {
        $item = $this->repo->getById($id);

        if ( ! $item)
        {
            return $this->respondNotFound();
        }

        return $this->response->item($item, new $this->transformerClass);
    }
406089
public function getService($id) {
		if ($this->factoryMode) {
			return $this->initService($id);
		}
		
		$fullId = $id . ':' . $this->getIdByArgs([]);
		
		if (! isset($this->services[$fullId])) {
			$this->services[$fullId] = $this->initService($id);
		}
			
		return $this->services[$fullId];
	}
210870
public static function create($id = null)
    {
        if ( empty($id) )
        {
            $id = md5(__METHOD__) . count(self::$instances); 
        }
        if ( empty(self::$instances[$id]) )
        {
            self::$instances[$id] = new self();  
        }
        return self::$instances[$id];
    }
339632
public function tokenById($id)
    {
        if ($user = $this->provider->retrieveById($id)) {
            return $this->jwT->fromUser($user);
        }
    }
557238
public function deleteById($id) {
		$this->provider('cache')->cacheClear('db', $this->getDao()->getTableName());
	    $obj = $this->getConnection()->where($this->getDao()->getTableId(), $id);
        return $obj->delete($this->getDao()->getTableName());
	}
834033
public function clockwork($id)
    {
        $request = [
            'op' => 'get',
            'id' => $id,
        ];

        $openHandler = new OpenHandler($this->debugbar);
        $data = $openHandler->handle($request, false, false);

        // Convert to Clockwork
        $converter = new Converter();
        $output = $converter->convert(json_decode($data, true));

        return response()->json($output);
    }
1216448
public function build($id)
    {
        if ($this->internalContainer->offsetExists($id)) {
            return $this->internalContainer->offsetGet($id);
        }

        if ($this->externalContainer && $this->externalContainer->has($id)) {
            return $this->externalContainer->get($id);
        }

        throw new ServiceNotFoundException("Service '$id' not found in any of the containers.");
    }
1362693
public function store($id)
    {
        $block = $this->getBlock($id);
        if (!empty($block)) {
            $this->authorize('create', $block);
            $this->authorize('update', $block);
            $input       = $this->validator->validate('create');
            $translation = $this->repository->createTranslation($block, $input);
            return $this->respondWithSuccess($translation, new BlockTranslationTransformer);
        }
        return $this->respondNotFound();
    }
388662
public function getPlatformById($id)
    {
        $id = (int) $id;
        $id = max(0, $id);

        return $this->request('platforms/'.$id);
    }
194063
public function getById($id)
    {
        $certificate = $this->adapter->get(sprintf('%s/certificates/%s', $this->endpoint, $id));

        $certificate = json_decode($certificate);

        return new CertificateEntity($certificate->certificate);
    }
246273
protected function byId($id)
    {
        //在QueryRelate 中的 __call中也没有找到first，需要用getQuery()，它指向的是Query\Builder
        $model = $this->queryRelate->where($this->repository->getModel()->getKeyName(), $id)->getQuery()->first();

        $this->resetQueryRelate();

        return $model;
    }