URLify::add_chars PHP 메소드

add_chars() 공개 정적인 메소드

Add new characters to the list. $map should be a hash.
public static add_chars ( $map )
    public static function add_chars($map)
    {
        if (!is_array($map)) {
            throw new LogicException('$map must be an associative array.');
        }
        self::$maps[] = $map;
        self::$map = array();
        self::$chars = '';
    }

Usage Example

예제 #1
0
파일: URLifyTest.php 프로젝트: baardev/lbtb
 function test_add_chars()
 {
     $this->assertEquals('¿ ® ¼ ¼ ¾ ¶', URLify::downcode('¿ ® ¼ ¼ ¾ ¶'));
     URLify::add_chars(array('¿' => '?', '®' => '(r)', '¼' => '1/4', '¼' => '1/2', '¾' => '3/4', '¶' => 'P'));
     $this->assertEquals('? (r) 1/2 1/2 3/4 P', URLify::downcode('¿ ® ¼ ¼ ¾ ¶'));
 }
All Usage Examples Of URLify::add_chars