mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 09:42:24 +01: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';
|
|
}
|
|
}
|