Exemplo n.º 1
0
 function testTargetAttachment()
 {
     $url = new SimpleUrl('http://www.site.com/home.html');
     $this->assertIdentical($url->getTarget(), false);
     $url->setTarget('A frame');
     $this->assertIdentical($url->getTarget(), 'A frame');
 }
Exemplo n.º 2
0
 /**
  *    Fetches a page or a single frame if that is the current
  *    focus.
  *    @param SimpleUrl $url                   Target to fetch.
  *    @param SimpleEncoding $parameters       GET/POST parameters.
  *    @return string                          Raw content of page.
  *    @access private
  */
 function _load($url, $parameters)
 {
     $frame = $url->getTarget();
     if (!$frame || !$this->_page->hasFrames() || strtolower($frame) == '_top') {
         return $this->_loadPage($url, $parameters);
     }
     return $this->_loadFrame(array($frame), $url, $parameters);
 }