lithium\util\Inflector::classify PHP Method

classify() public static method

Takes a under_scored table name and returns corresponding class name.
public static classify ( string $tableName ) : string
$tableName string Under_scored and plural table name (i.e. `'posts'`).
return string CamelCased class name (i.e. `'Post'`).
    public static function classify($tableName)
    {
        return static::camelize(static::singularize($tableName));
    }

Usage Example

Beispiel #1
0
 /**
  * Get the class name for the mock.
  *
  * @param string $request
  * @return string
  */
 protected function _class($request)
 {
     $name = $request->action;
     $type = $request->command;
     if ($command = $this->_instance($type)) {
         $request->params['action'] = $name;
         $name = $command->invokeMethod('_class', array($request));
     }
     return Inflector::classify("Mock{$name}");
 }
All Usage Examples Of lithium\util\Inflector::classify