mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-06-10 07:54:56 +02:00
22 lines
363 B
PHP
22 lines
363 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\Structural\Composite;
|
|
|
|
/**
|
|
* Class TextElement.
|
|
*/
|
|
class TextElement extends FormElement
|
|
{
|
|
/**
|
|
* renders the text element.
|
|
*
|
|
* @param int $indent
|
|
*
|
|
* @return mixed|string
|
|
*/
|
|
public function render($indent = 0)
|
|
{
|
|
return str_repeat(' ', $indent).'this is a text element';
|
|
}
|
|
}
|