WP_CLI
Inflector::tableize()
Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'.
Метод класса: Inflector{}
Хуков нет.
Возвращает
Строку
. The tableized word.
Использование
$result = Inflector::tableize( $word );
- $word(строка) (обязательный)
- The word to tableize.
Код Inflector::tableize() Inflector::tableize WP-CLI 2.8.0-alpha
public static function tableize( $word ) { return strtolower( preg_replace( '~(?<=\\w)([A-Z])~', '_$1', $word ) ); }