WP_CLI
Inflector::tableize()
Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'.
Method of the class: Inflector{}
No Hooks.
Return
String
. The tableized word.
Usage
$result = Inflector::tableize( $word );
- $word(string) (required)
- The word to tableize.
Inflector::tableize() Inflector::tableize code WP-CLI 2.8.0-alpha
public static function tableize( $word ) { return strtolower( preg_replace( '~(?<=\\w)([A-Z])~', '_$1', $word ) ); }