getClass() public method

public getClass ( )
Exemplo n.º 1
0
 protected function getRequestIdsIterator()
 {
     $json = new Gpf_Rpc_Json();
     $requestParams = new Gpf_Rpc_Params($json->decode($this->params->get(self::IDS_REQUEST)));
     $c = $requestParams->getClass();
     $gridService = new $c();
     if (!$gridService instanceof Gpf_View_GridService) {
         throw new Gpf_Exception(sprintf('%s is not Gpf_View_GridService class.', $requestParams->getClass()));
     }
     return $gridService->getIdsIterator($requestParams);
 }
Exemplo n.º 2
0
 function __construct(Gpf_Rpc_Params $params)
 {
     $this->methodName = $params->getMethod();
     $this->className = $params->getClass();
     $reflectionClass = new ReflectionClass($this->className);
     $reflectionMethod = $reflectionClass->getMethod($this->methodName);
     if (!$reflectionMethod->isPublic()) {
         throw new Gpf_Exception($this->className . '->' . $this->methodName . '() is not a service method (not public)');
     }
     $this->annotations = new Gpf_Rpc_Annotation($reflectionMethod);
     if (!$this->annotations->hasServiceAnnotation()) {
         throw new Gpf_Exception($this->className . '->' . $this->methodName . '() is not a service method (annotation)');
     }
     $this->initSession($params->getSessionId());
     $this->createInstance();
 }