kartik\helpers\Enum::properize PHP 메소드

properize() 공개 정적인 메소드

Example: ~~~ echo Enum::properize("Chris"); //returns Chris' echo Enum::properize("David"); //returns David's ~~~
public static properize ( string $string ) : string
$string string input string
리턴 string
    public static function properize($string)
    {
        $string = preg_replace('/\\s+(.*?)\\s+/', '*\\1*', $string);
        return $string . '\'' . ($string[strlen($string) - 1] != 's' ? 's' : '');
    }