메소드 | 설명 | |
---|---|---|
cdataSection ( string $content ) : string | Returns a CDATA section with the given $content. | |
contentTag ( string $name, string $content, array $options = null ) : string | Returns an HTML block tag of type $name surrounding the $content. | |
escape ( string $var ) : string | Escapes a value for output in a view template. | |
escapeOnce ( string $html ) : string | Returns the escaped $html without affecting existing escaped entities. | |
tag ( string $name, string $options = null ) : string | Returns an empty HTML tag of type $name. | |
tagOptions ( array $options ) : string | Converts an associative array of $options into a string of HTML attributes. |
메소드 | 설명 | |
---|---|---|
_fixDoubleEscape ( string $escaped ) : string | Fix double-escaped entities, such as &, {, etc. |
$this->cdataSection('');
=> ]]>
public cdataSection ( string $content ) : string
$content
string
Content for inside CDATA section.
리턴
string
CDATA section with content.
Add HTML attributes by passing an attributes hash to $options. For
attributes with no value (like disabled and readonly), give it a value
of TRUE in the $options array.
$this->contentTag('p', 'Hello world!')
=> Hello world!
$this->contentTag('div',
$this->contentTag('p', 'Hello world!'),
array('class' => 'strong'))
=> Hello world!
$this->contentTag('select', $options, array('multiple' => true))
=>
escape($this->templateVar) ?>
$this->escapeOnce('1 > 2 & 3')
=> '1 < 2 & 3'
public escapeOnce ( string $html ) : string
$html
string
HTML to be escaped.
리턴
string
Escaped HTML without affecting existing escaped entities.
Add HTML attributes by passing an attributes hash to $options. For
attributes with no value (like disabled and readonly), give it a value
of TRUE in the $options array.
$this->tag('br')
=>
$this->tag('input', array('type' => 'text', 'disabled' => true))
=>
Converts an associative array of $options into a string of HTML
attributes.
public tagOptions ( array $options ) : string
$options
array
Key/value pairs.
리턴
string
'key1="value1" key2="value2"'