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

Adds an attribute to be rendered.
public addAttribute ( $name, $value )
Пример #1
0
 public function testRenderBeginTag()
 {
     $writer = new THtmlWriter(self::$output);
     $writer->addAttribute('type', 'text');
     $writer->addAttribute('value', 'Prado');
     $writer->addStyleAttribute('font-size', '1em');
     $writer->renderBeginTag('input');
     self::assertEquals('<input type="text" value="Prado" style="font-size:1em;" />', self::$output->flush());
 }