Prado\TComponent::canGetProperty PHP 메소드

canGetProperty() 공개 메소드

A property can be read if the class has a getter method for the property name. Note, property name is case-insensitive. This also checks for getjs. When enabled, it loops through all active behaviors for the get property when undefined by the object.
public canGetProperty ( $name ) : boolean
리턴 boolean whether the property can be read
    public function canGetProperty($name)
    {
        if (method_exists($this, 'get' . $name) || method_exists($this, 'getjs' . $name)) {
            return true;
        } else {
            if ($this->_m !== null && $this->_behaviorsenabled) {
                foreach ($this->_m->toArray() as $behavior) {
                    if ((!$behavior instanceof IBehavior || $behavior->getEnabled()) && $behavior->canGetProperty($name)) {
                        return true;
                    }
                }
            }
        }
        return false;
    }