Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace {
- require_once 'Nette/loader.php';
- Nette\Diagnostics\Debugger::enable();
- Nette\Diagnostics\Debugger::$strictMode = TRUE;
- $container = new Nette\Forms\Container;
- $text = $container->addText('name');
- dump($container);
- }
- namespace Nette\Forms {
- use Nette;
- class Container
- {
- private $controls;
- /** @return Nette\Forms\Controls\TextInput */
- public function addText($name)
- {
- return $this->controls[$name] = new Controls\TextInput;
- }
- }
- }
- //----------------------------------------
- namespace Nette\Forms\Controls {
- class TextInput
- {
- private $value;
- /** @return string */
- public function getValue()
- {
- return $this->value;
- }
- }
- }
- #### output
- Nette\Forms\Container(1) {
- controls private => array(1) {
- name => Nette\Forms\Controls\TextInput(1) {
- value private => NULL
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment