Prado\TComponent::__unset PHP Метод

__unset() публичный Метод

Do not call this method. This is a PHP magic method that we override to allow using unset() to set a component property to be null.
С версии: 3.2.3
public __unset ( $name )
    public function __unset($name)
    {
        if (method_exists($this, $setter = 'set' . $name)) {
            $this->{$setter}(null);
        } else {
            if (method_exists($this, $jssetter = 'setjs' . $name)) {
                $this->{$jssetter}(null);
            } else {
                if (strncasecmp($name, 'on', 2) === 0 && method_exists($this, $name)) {
                    $this->_e[strtolower($name)]->clear();
                } else {
                    if (strncasecmp($name, 'fx', 2) === 0) {
                        $this->getEventHandlers($name)->remove(array($this, $name));
                    } else {
                        if ($this->_m !== null && $this->_m->getCount() > 0 && $this->_behaviorsenabled) {
                            if (isset($this->_m[$name])) {
                                $this->detachBehavior($name);
                            } else {
                                $unset = 0;
                                foreach ($this->_m->toArray() as $behavior) {
                                    if (!$behavior instanceof IBehavior || $behavior->getEnabled()) {
                                        unset($behavior->{$name});
                                        $unset++;
                                    }
                                }
                                if (!$unset && method_exists($this, 'get' . $name)) {
                                    throw new TInvalidOperationException('component_property_readonly', get_class($this), $name);
                                }
                            }
                        } else {
                            if (method_exists($this, 'get' . $name)) {
                                throw new TInvalidOperationException('component_property_readonly', get_class($this), $name);
                            }
                        }
                    }
                }
            }
        }
    }