mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-08 16:06:31 +02:00
start a restructure
This commit is contained in:
21
Structural/Composite/TextElement.php
Normal file
21
Structural/Composite/TextElement.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\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';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user