PHP 클래스 Phrocco\Pygment

This class simply proxies to two possible handlers, a local install of the Pygmentize gem or a remote webservice. If the command line option is unavailable then it gets delegated to a web service. Obviously using the web service will require a net connection and may slow down the processing time.
저자: Ross Riley
파일 보기 프로젝트 열기: rossriley/phrocco 1 사용 예제들

공개 메소드들

메소드 설명
local_pygment ( $language, $code ) : `string` ### Use Local Gem If the pygmentize gem is available locally then we use this to parse the code.
pygmentize ( `string` $language, `string` $code ) : `void` This is the main method that returns the processed code, and decides whether to use a local gem or a remote web service.
webservice ( $language, $code ) : `string` ### Use Web Service If the pygmentize gem is not available locally then we use a remote web serivce as a fallback.

메소드 상세

local_pygment() 공개 메소드

### Use Local Gem If the pygmentize gem is available locally then we use this to parse the code.
public local_pygment ( $language, $code ) : `string`
리턴 `string`

pygmentize() 공개 메소드

This is the main method that returns the processed code, and decides whether to use a local gem or a remote web service.
public pygmentize ( `string` $language, `string` $code ) : `void`
$language `string`
$code `string`
리턴 `void`

webservice() 공개 메소드

### Use Web Service If the pygmentize gem is not available locally then we use a remote web serivce as a fallback.
public webservice ( $language, $code ) : `string`
리턴 `string`