/**
  * Resolve proxy class name to a filename based on the following pattern.
  *
  * 1. Remove Proxy namespace from class name
  * 2. Remove namespace seperators from remaining class name.
  * 3. Return PHP filename from proxy-dir with the result from 2.
  *
  * @param string $proxyDir
  * @param string $proxyNamespace
  * @param string $className
  * @return string
  */
 public static function resolveFile($proxyDir, $proxyNamespace, $className)
 {
     if (0 !== strpos($className, $proxyNamespace)) {
         throw ProxyException::notProxyClass($className, $proxyNamespace);
     }
     $className = str_replace('\\', '', substr($className, strlen($proxyNamespace) + 1));
     return $proxyDir . DIRECTORY_SEPARATOR . $className . '.php';
 }
Exemplo n.º 2
0
 /**
  * @param ProxyEventInterface $event
  * @param \Exception          $previous
  */
 function __construct(ProxyEventInterface $event, \Exception $previous = null)
 {
     $this->event = $event;
     parent::__construct(sprintf('Event (%s) was cancelled', get_class($event)), 1, $previous);
 }
 public function __construct()
 {
     $this->httpStatusCode = 403;
     $this->errorType = 'proxy_cookie_expired';
     parent::__construct(\Lang::get('api-proxy-laravel::messages.proxy_cookie_expired'));
 }
 public function __construct($parameter)
 {
     $this->httpStatusCode = 400;
     $this->errorType = 'proxy_missing_param';
     parent::__construct(\Lang::get('api-proxy-laravel::messages.proxy_missing_param', array('param' => $parameter)));
 }
 public function __construct($parameter)
 {
     $this->httpStatusCode = 500;
     $this->errorType = 'missing_client_secret';
     parent::__construct(\Lang::get('api-proxy-laravel::messages.missing_client_secret', array('client' => $parameter)));
 }
 public function __construct()
 {
     $this->httpStatusCode = 500;
     $this->errorType = 'proxy_response_parse_error';
     parent::__construct(\Lang::get('api-proxy-laravel::messages.proxy_response_parse_error'));
 }