コード例 #1
0
 /**
  * Checks if withRoute() accepts null and passes that value
  * to the url helper.
  */
 public function testNullIsAcceptedAsRoute()
 {
     $this->url->withRoute(null);
     (string) $this->url;
     $params = $this->getParamsOfLastHelperCall();
     $this->assertNull($params['name']);
 }
コード例 #2
0
ファイル: To.php プロジェクト: matthimatiker/molcomponents
 /**
  * Returns a url object that may be parametrized further and that
  * is automatically converted to a url string when it is printed.
  *
  * @param string $action
  * @param string $controller
  * @param string $module
  * @return Mol_View_Helper_Value_Url
  */
 public function to($action, $controller, $module = 'default')
 {
     $url = new Mol_View_Helper_Value_Url($this->view);
     $url->withParam('action', $action);
     $url->withParam('controller', $controller);
     $url->withParam('module', $module);
     $url->withRoute('default');
     return $url;
 }