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
파일: BaseMapper.php 프로젝트: nextras/orm
 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