PHP Класс Timber\PostPreview

С версии: 1.0.4
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$char_length
$end
$force
$length
$post
$readmore
$strip

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

Метод Описание
__construct ( Post $post )
__toString ( )
chars ( integer $char_length = false )
end ( string $end = '…' )
force ( boolean $force = true )
length ( integer $length = 50 )
read_more ( string $readmore = 'Read More' )
strip ( boolean | string $strip = true )

Защищенные методы

Метод Описание
assemble ( string $text, array | booelan $readmore_matches, boolean $trimmed )
run ( )

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

__construct() публичный Метод

public __construct ( Post $post )
$post Post

__toString() публичный Метод

public __toString ( )

assemble() защищенный Метод

protected assemble ( string $text, array | booelan $readmore_matches, boolean $trimmed )
$text string
$readmore_matches array | booelan
$trimmed boolean was the text trimmed?

chars() публичный Метод

public chars ( integer $char_length = false )
$char_length integer (in characters) of the target preview

end() публичный Метод

public end ( string $end = '…' )
$end string how should the text in the preview end

force() публичный Метод

public force ( boolean $force = true )
$force boolean If the editor wrote a manual excerpt longer than the set length, should it be "forced" to the size specified?

length() публичный Метод

public length ( integer $length = 50 )
$length integer (in words) of the target preview

read_more() публичный Метод

public read_more ( string $readmore = 'Read More' )
$readmore string What the text displays as to the reader inside of the tag

run() защищенный Метод

protected run ( )

strip() публичный Метод

public strip ( boolean | string $strip = true )
$strip boolean | string strip the tags or what? You can also provide a list of allowed tags

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

$char_length защищенное свойство

protected $char_length

$end защищенное свойство

protected $end

$force защищенное свойство

protected $force

$length защищенное свойство

protected $length

$post защищенное свойство

protected $post

$readmore защищенное свойство

protected $readmore

$strip защищенное свойство

protected $strip