Esempio n. 1
0
 private function makeCall($context, $cmd, $service, $path = null)
 {
     $method = $service;
     if (!empty($path) && !is_numeric($path)) {
         $method = $path;
         $path = null;
     }
     return (object) array('context' => $context, 'http' => $cmd, 'service' => $service, 'method' => $method, 'function' => $cmd . U::dashedToCamelCase($method), 'path' => $path);
 }
Esempio n. 2
0
 /**
  * @param Context $context
  * @param string  $cmd
  * @param string  $service
  * @param string  $path
  */
 protected function push($context, $cmd, $service, $path = null)
 {
     $method = $service;
     if (!empty($path) && !is_numeric($path)) {
         $method = $path;
         $path = null;
     }
     $this->chain[] = (object) array('context' => $context, 'http' => $cmd, 'service' => $service, 'method' => $method, 'function' => $cmd . U::dashedToCamelCase($method), 'path' => $path);
 }
Esempio n. 3
0
 public function testDashedToCamelCase()
 {
     $this->assertEquals('Class', U::dashedToCamelCase('class'));
     $this->assertEquals('MyApp', U::dashedToCamelCase('my-app'));
     $this->assertEquals('VeryVeryVeryVeryLONG', U::dashedToCamelCase('very-very-very-very-LONG'));
 }