jablonka.czprosek.czf

freenet-router

Subversion Repositories:
[/] [trunk/] [freenet-router/] [var/] [www/] [freenet-router/] [Framework/] [Libraries/] [UI/] [Model/] [TextBox.php] - Rev 2

Compare with Previous - Blame - Download


<?php

namespace Phem\Libraries\UI\Model;

use Phem\Core\Collection;

/**
 * @author Jakub PetrŞílka <petrzilka@czweb.net>
 */
class TextBox extends Control
{

    /**
     *
     * @\Phem\Libraries\UI\Annotations\DomPath(path="input")
     * @\Phem\Libraries\UI\Annotations\DomAttr(name="value")
     */
    private $text;
    private $enabled = true;
    private $readonly = false;
    private $onChange;
    private $onKeyup;
    
    function __construct($parent)
    {
        parent::__construct($parent);
        $this->onChange = new Collection();
        $this->onKeyup = new Collection();
    }    

    public function getText()
    {
        return $this->text;
    }

    protected function setText($text)
    {
        $this->text = $text;
    }

    public function getEnabled()
    {
        return $this->enabled;
    }

    protected function setEnabled($enabled)
    {
        $this->enabled = $enabled;
    }

    public function getReadonly()
    {
        return $this->readonly;
    }

    protected function setReadonly($readonly)
    {
        $this->readonly = $readonly;
    }

    public function OnChange()
    {
        return $this->onChange;
    }
    
    public function OnKeyup()
    {
        return $this->onKeyup;
    }    

    public function getValue()
    {
        return $this->getText();
    }

    protected function setValue($value)
    {
        $this->setText($value);
    }

}

Powered by WebSVN 2.2.1