예제 #1
0
파일: UtilityTest.php 프로젝트: hawkao/mew
 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'));
 }
예제 #2
0
파일: Registry.php 프로젝트: hawkao/mew
 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();
 }