Exemplo n.º 1
0
 public function testForcedSchemeAssembling()
 {
     $request = new Zend_Controller_Router_RewriteTest_Request_Stub('www.zend.com');
     $route = new Zend_Controller_Router_Route_Hostname('www.zend.com', array('controller' => 'host-foo', 'action' => 'host-bar'), array(), 'https');
     $route->setRequest($request);
     $url = $route->assemble();
     $this->assertEquals('https://www.zend.com', $url);
 }
Exemplo n.º 2
0
 /**
  * Overrides assemble to add port
  *
  * @param  array $data
  * @param  boolean $reset
  * @return string
  */
 public function assemble($data = array(), $reset = false, $encode = false, $partial = false)
 {
     // Default assemble
     $url = parent::assemble($data, $reset, $encode, $partial);
     // Add port if needed
     return $url . ($this->hasPort() ? ':' . $this->getPort() : '');
 }