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

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

The name 'isa' stands for 'is a'. This first checks if $this is an instanceof the class. It then checks each Behavior. If a behavior implements {@link IInstanceCheck}, then the behavior can determine what it is an instanceof. If this behavior function returns true, then this method returns true. If the behavior instance checking function returns false, then no further checking is performed as it is assumed to be correct. If the behavior instance check function returns nothing or null or the behavior doesn't implement the {@link IInstanceCheck} interface, then the default instanceof occurs. The default isa behavior is to check if the behavior is an instanceof the class. The behavior {@link IInstanceCheck} is to allow a behavior to have the host object act as a completely different object.
С версии: 3.2.3
public isa ( $class ) : boolean
Результат boolean whether or not the object or a behavior is an instance of a particular class
    public function isa($class)
    {
        if ($this instanceof $class) {
            return true;
        }
        if ($this->_m !== null && $this->_behaviorsenabled) {
            foreach ($this->_m->toArray() as $behavior) {
                if ($behavior instanceof IBehavior && !$behavior->getEnabled()) {
                    continue;
                }
                $check = null;
                if ($behavior->isa('\\Prado\\Util\\IInstanceCheck') && ($check = $behavior->isinstanceof($class, $this))) {
                    return true;
                }
                if ($check === null && $behavior->isa($class)) {
                    return true;
                }
            }
        }
        return false;
    }