PHP 클래스 Horde_Text_Filter_Linkurls, horde

Changes: - Require at least one slash after the protocol. Horde's other filters don't expect us to match mailto: as part of these filters, so don't. - Limit the URL protocol to 20 characters to avoid PCRE problems. - Allow "+" characters in URL protocols (like svn+ssh://). Parameters: - callback: (string) A callback function that the URL is passed through before being set as the href attribute. Must be a string with the function name, the function must take the original URL as the first and only parameter. DEFAULT: No callback - class: (string) The CSS class of the generated links. DEFAULT: none - encode: (boolean) Whether to escape special HTML characters in the URLs and finally "encode" the complete tag so that it can be decoded later with the decode() method. This is useful if you want to run htmlspecialchars() or similar *after* using this filter. DEFAULT: false - nofollow: (boolean) Whether to set the 'rel="nofollow"' attribute on links. DEFAULT: false - target: (string) The link target. DEFAULT: '_blank' Copyright 2003-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
저자: Tyler Colbert ([email protected])
저자: Jan Schneider ([email protected])
저자: Chuck Hagenbuch ([email protected])
상속: extends Horde_Text_Filter_Base
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$regex Link-finding regex

보호된 프로퍼티들

프로퍼티 타입 설명
$_params array Filter parameters.

공개 메소드들

메소드 설명
callback ( $match )
decode ( string $text ) : string "Decodes" the text formerly encoded by using the "encode" parameter.
getPatterns ( ) : array Returns a hash with replace patterns.
getRegex ( ) : string Return the regex used to search for links.
initializeRegex ( ) Initialize the regex for this instance.

보호된 메소드들

메소드 설명
_parseurl ( string $url ) : mixed Handle multi-byte data since parse_url is not multibyte safe on all systems. Adapted from php.net/parse_url comments.

메소드 상세

_parseurl() 보호된 메소드

See https://bugs.php.net/bug.php?id=52923 for description of parse_url issues.
protected _parseurl ( string $url ) : mixed
$url string The url to parse.
리턴 mixed The parsed url.

callback() 공개 메소드

public callback ( $match )

decode() 공개 정적인 메소드

"Decodes" the text formerly encoded by using the "encode" parameter.
public static decode ( string $text ) : string
$text string An encoded text.
리턴 string The decoded text.

getPatterns() 공개 메소드

Returns a hash with replace patterns.
public getPatterns ( ) : array
리턴 array Patterns hash.

getRegex() 공개 정적인 메소드

Return the regex used to search for links.
public static getRegex ( ) : string
리턴 string The regex string.

initializeRegex() 공개 정적인 메소드

Initialize the regex for this instance.
public static initializeRegex ( )

프로퍼티 상세

$_params 보호되어 있는 프로퍼티

Filter parameters.
protected array $_params
리턴 array

$regex 공개적으로 정적으로 프로퍼티

Link-finding regex
public static $regex