Exemple #1
0
 public function testCamelCase()
 {
     $this->assertEquals('CamelCase', Utility::CamelCase('camelCase'));
     $this->assertEquals('CamelCase', Utility::CamelCase('Camel_case'));
     $this->assertEquals('CamelCase', Utility::CamelCase('camel_case'));
     $this->assertEquals('CamelCase', Utility::CamelCase('camel_Case'));
 }
Exemple #2
0
 public static function controller($path)
 {
     $name = 'ukatama\\Mew\\Controller\\' . Utility::CamelCase($path) . 'Controller';
     if (!class_exists($name)) {
         throw new NotFoundException("Controller \"{$path}\" is not defined");
     }
     return new $name();
 }