PHP 클래스 BBCode, vanilla

파일 보기 프로젝트 열기: vanilla/vanilla 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$media A list of records from the Media table, indexed by MediaID.
$nbbc An instance of Nbbc\BBcode.

공개 메소드들

메소드 설명
doAttachment ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : string Perform formatting against a string for the attach tag.
doImage ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : boolean | string Perform formatting against a string for the img tag.
doQuote ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : boolean | string Perform formatting against a string for the quote tag.
doSize ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : string Perform formatting against a string for the size tag.
doURL ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : boolean | string Perform formatting against a string for the url tag.
doVideo ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : string Perform formatting against a string for the video tag.
doYoutube ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : boolean | string Perform formatting against a string for the youtube tag
format ( string $bbcode ) : string Parse the provided BBCode into an HTML string.
media ( ) : array Build and return a list of attachments for the current page.
nbbc ( ) : Nbbc\BBCode Create, configure and return an instance of Nbbc\BBcode.
removeAttachment ( ) : string Custom handler for the attachment tag.

메소드 상세

doAttachment() 공개 메소드

Perform formatting against a string for the attach tag.
public doAttachment ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : string
$bbcode Nbbc\BBCode Instance of Nbbc doing the parsing.
$action integer Value of one of NBBC's defined constants. Typically, this will be BBCODE_CHECK.
$name string Name of the tag.
$default string Value of the _default parameter, from the $params array.
$params array A standard set parameters related to the tag.
$content string Value between the open and close tags, if any.
리턴 string Formatted value.

doImage() 공개 메소드

Perform formatting against a string for the img tag.
public doImage ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : boolean | string
$bbcode Nbbc\BBCode Instance of Nbbc doing the parsing.
$action integer Value of one of NBBC's defined constants. Typically, this will be BBCODE_CHECK.
$name string Name of the tag.
$default string Value of the _default parameter, from the $params array.
$params array A standard set parameters related to the tag.
$content string Value between the open and close tags, if any.
리턴 boolean | string Formatted value.

doQuote() 공개 메소드

Perform formatting against a string for the quote tag.
public doQuote ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : boolean | string
$bbcode Nbbc\BBCode Instance of Nbbc doing the parsing.
$action integer Value of one of NBBC's defined constants. Typically, this will be BBCODE_CHECK.
$name string Name of the tag.
$default string Value of the _default parameter, from the $params array.
$params array A standard set parameters related to the tag.
$content string Value between the open and close tags, if any.
리턴 boolean | string Formatted value.

doSize() 공개 메소드

Perform formatting against a string for the size tag.
public doSize ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : string
$bbcode Nbbc\BBCode Instance of Nbbc doing the parsing.
$action integer Value of one of NBBC's defined constants. Typically, this will be BBCODE_CHECK.
$name string Name of the tag.
$default string Value of the _default parameter, from the $params array.
$params array A standard set parameters related to the tag.
$content string Value between the open and close tags, if any.
리턴 string Formatted value.

doURL() 공개 메소드

Perform formatting against a string for the url tag.
public doURL ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : boolean | string
$bbcode Nbbc\BBCode Instance of Nbbc doing the parsing.
$action integer Value of one of NBBC's defined constants. Typically, this will be BBCODE_CHECK.
$name string Name of the tag.
$default string Value of the _default parameter, from the $params array.
$params array A standard set parameters related to the tag.
$content string Value between the open and close tags, if any.
리턴 boolean | string Formatted value.

doVideo() 공개 메소드

Perform formatting against a string for the video tag.
public doVideo ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : string
$bbcode Nbbc\BBCode Instance of Nbbc doing the parsing.
$action integer Value of one of NBBC's defined constants. Typically, this will be BBCODE_CHECK.
$name string Name of the tag.
$default string Value of the _default parameter, from the $params array.
$params array A standard set parameters related to the tag.
$content string Value between the open and close tags, if any.
리턴 string Formatted value.

doYoutube() 공개 메소드

Perform formatting against a string for the youtube tag
public doYoutube ( Nbbc\BBCode $bbcode, integer $action, string $name, string $default, array $params, string $content ) : boolean | string
$bbcode Nbbc\BBCode Instance of Nbbc doing the parsing.
$action integer Value of one of NBBC's defined constants. Typically, this will be BBCODE_CHECK.
$name string Name of the tag.
$default string Value of the _default parameter, from the $params array.
$params array A standard set parameters related to the tag.
$content string Value between the open and close tags, if any.
리턴 boolean | string Formatted value.

format() 공개 메소드

Parse the provided BBCode into an HTML string.
public format ( string $bbcode ) : string
$bbcode string Raw BBCode.
리턴 string HTML code, generated from the provided BBCode.

media() 공개 메소드

Build and return a list of attachments for the current page.
public media ( ) : array
리턴 array

nbbc() 공개 메소드

Create, configure and return an instance of Nbbc\BBcode.
public nbbc ( ) : Nbbc\BBCode
리턴 Nbbc\BBCode

removeAttachment() 공개 메소드

Custom handler for the attachment tag.
public removeAttachment ( ) : string
리턴 string

프로퍼티 상세

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

A list of records from the Media table, indexed by MediaID.
protected $media

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

An instance of Nbbc\BBcode.
protected $nbbc