PHP Класс PHPFusion\OutputHandler

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$jqueryTags string Additional javascripts
$pageFooterTags string Additional contents to the footer
$pageHeadTags string Additional tags to the html head
$pageTitle string The title in the "title" tag

Открытые методы

Метод Описание
addHandler ( callback $callback ) Add a new output handler function
addToFooter ( string $tag = "" ) Add content to the footer
addToHead ( string $tag = "" ) Add content to the html head
addToJQuery ( string $tag = "" ) Add javascript source code to the output
addToMeta ( string $name, string $addition = "" ) Append something to a meta tag
addToTitle ( type $addition = "" ) Append something to the title of the page
getTitle ( ) Get Current Page Title
handleOutput ( string $output ) : string Execute the output handlers
replaceInOutput ( string $target, string $replace, string $modifiers = "" ) Replace something in the output using regexp
setMeta ( string $name, string $content = "" ) Set a meta tag by name
setTitle ( string $title = "" ) Set the new title of the page

Описание методов

addHandler() публичный статический Метод

Add a new output handler function
public static addHandler ( callback $callback )
$callback callback The name of a function or other callable object

addToFooter() публичный статический Метод

Add content to the footer
public static addToFooter ( string $tag = "" )
$tag string

addToHead() публичный статический Метод

Add content to the html head
public static addToHead ( string $tag = "" )
$tag string

addToJQuery() публичный статический Метод

Add javascript source code to the output
public static addToJQuery ( string $tag = "" )
$tag string

addToMeta() публичный статический Метод

Append something to a meta tag
public static addToMeta ( string $name, string $addition = "" )
$name string
$addition string

addToTitle() публичный статический Метод

Append something to the title of the page
public static addToTitle ( type $addition = "" )
$addition type

getTitle() публичный статический Метод

Get Current Page Title
public static getTitle ( )

handleOutput() публичный статический Метод

Execute the output handlers
public static handleOutput ( string $output ) : string
$output string
Результат string

replaceInOutput() публичный статический Метод

Replace something in the output using regexp
public static replaceInOutput ( string $target, string $replace, string $modifiers = "" )
$target string Regexp pattern without delimiters
$replace string The new content
$modifiers string Regexp modifiers

setMeta() публичный статический Метод

Set a meta tag by name
public static setMeta ( string $name, string $content = "" )
$name string
$content string

setTitle() публичный статический Метод

Set the new title of the page
public static setTitle ( string $title = "" )
$title string

Описание свойств

$jqueryTags публичное статическое свойство

Additional javascripts
public static string $jqueryTags
Результат string

$pageFooterTags публичное статическое свойство

Additional contents to the footer
public static string $pageFooterTags
Результат string

$pageHeadTags публичное статическое свойство

Additional tags to the html head
public static string $pageHeadTags
Результат string

$pageTitle публичное статическое свойство

The title in the "title" tag
public static string $pageTitle
Результат string