Nextras\Orm\StorageReflection\StringHelper::underscore PHP Метод

underscore() публичный статический Метод

public static underscore ( $string ) : string
Результат string
    public static function underscore($string)
    {
        return strtolower(preg_replace('#(\\w)([A-Z])#', '$1_$2', $string));
    }

Usage Example

Пример #1
0
 public function getTableName()
 {
     if (!$this->tableName) {
         $tableName = str_replace('Mapper', '', $this->getReflection()->getShortName());
         $this->tableName = StringHelper::underscore($tableName);
     }
     return $this->tableName;
 }
All Usage Examples Of Nextras\Orm\StorageReflection\StringHelper::underscore