public function setFrameFocus($name)
    {
        if (is_integer($this->focus)) {
            if ($this->frames[$this->focus]->hasFrames()) {
                return $this->frames[$this->focus]->setFrameFocus($name);
            }
        }
        if (in_array($name, array_keys($this->names))) {
            $this->focus = $this->names[$name];

            return true;
        }

        return false;
    }
public function setFrameFocus($name)
    {
        if (is_integer($this->focus)) {
            if ($this->frames[$this->focus]->hasFrames()) {
                return $this->frames[$this->focus]->setFrameFocus($name);
            }
        }
        if (in_array($name, array_keys($this->names))) {
            $this->focus = $this->names[$name];

            return true;
        }

        return false;
    }
public function setFrameFocus ( $ name ) { if ( is_integer ( $ this -> focus ) ) { if ( $ this -> frames [ $ this -> focus ] -> hasFrames ( ) ) { return $ this -> frames [ $ this -> focus ] -> setFrameFocus ( $ name ) ; } } if ( in_array ( $ name , array_keys ( $ this -> names ) ) ) { $ this -> focus = $ this -> names [ $ name ] ; return true ; } return false ; }
Sets the focus by name.
If already focused and the target frame also has frames,
then the nested frame will be focused.

@param string $name    Chosen frame.

@return bool        True if frame exists.
Sets the focus by name . If already focused and the target frame also has frames then the nested frame will be focused .