public function find_instance($instanceid) {
        foreach ($this->regions as $region => $notused) {
            $this->ensure_instances_exist($region);
            foreach($this->blockinstances[$region] as $instance) {
                if ($instance->instance->id == $instanceid) {
                    return $instance;
                }
            }
        }
        throw new block_not_on_page_exception($instanceid, $this->page);
    }
public function find_instance($instanceid) {
        foreach ($this->regions as $region => $notused) {
            $this->ensure_instances_exist($region);
            foreach($this->blockinstances[$region] as $instance) {
                if ($instance->instance->id == $instanceid) {
                    return $instance;
                }
            }
        }
        throw new block_not_on_page_exception($instanceid, $this->page);
    }
public function find_instance ( $ instanceid ) { foreach ( $ this -> regions as $ region => $ notused ) { $ this -> ensure_instances_exist ( $ region ) ; foreach ( $ this -> blockinstances [ $ region ] as $ instance ) { if ( $ instance -> instance -> id == $ instanceid ) { return $ instance ; } } } throw new block_not_on_page_exception ( $ instanceid , $ this -> page ) ; }
Find a given block by its instance id

@param integer $instanceid
@return block_base
Find a given block by its instance id