Orangehill\Iseed\Iseed::generateClassName PHP Method

generateClassName() public method

Generates a seed class name (also used as a filename)
public generateClassName ( string $table ) : string
$table string
return string
    public function generateClassName($table)
    {
        $tableString = '';
        $tableName = explode('_', $table);
        foreach ($tableName as $tableNameExploded) {
            $tableString .= ucfirst($tableNameExploded);
        }
        return ucfirst($tableString) . 'TableSeeder';
    }

Usage Example

示例#1
0
 /**
  * Generates a seed class name (also used as a filename)
  *
  * @param string $table
  * @return string 
  * @static 
  */
 public static function generateClassName($table)
 {
     return \Orangehill\Iseed\Iseed::generateClassName($table);
 }