PHP 클래스 Horde_View_Helper_Tag, horde

By default, they output HTML 4.01 Strict compliant tags.
저자: Mike Naberezny ([email protected])
저자: Derek DeVries ([email protected])
저자: Chuck Hagenbuch ([email protected])
상속: extends Horde_View_Helper_Base
파일 보기 프로젝트 열기: horde/horde

공개 메소드들

메소드 설명
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.

메소드 상세

cdataSection() 공개 메소드

CDATA sections are used to escape blocks of text containing characters which would otherwise be recognized as markup. CDATA sections begin with the string "". $this->cdataSection(''); => ]]>
public cdataSection ( string $content ) : string
$content string Content for inside CDATA section.
리턴 string CDATA section with content.

contentTag() 공개 메소드

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)) =>
public contentTag ( string $name, string $content, array $options = null ) : string
$name string Tag name.
$content string Content to place between the tags.
$options array Tag attributes.
리턴 string Generated HTML tags with content between.

escape() 공개 메소드

escape($this->templateVar) ?>

public escape ( string $var ) : string
$var string The output to escape.
리턴 string The escaped value.

escapeOnce() 공개 메소드

$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.

tag() 공개 메소드

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)) =>
public tag ( string $name, string $options = null ) : string
$name string Tag name.
$options string Tag attributes.
리턴 string Generated HTML tag.

tagOptions() 공개 메소드

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"'