function toUrl($params, $route_name = '') { if ($route_name && isset($this->config[$route_name])) { if ($path = $this->_makeUrlByRoute($params, $this->config[$route_name])) { return $path; } } elseif (!$route_name) { foreach ($this->config as $name => $route) { if ($path = $this->_makeUrlByRoute($params, $route)) { return $path; } } } throw new lmbException($message = "Route '{$route_name}' not found for params '" . lmb_var_dump($params) . "'"); }
function testVarDump_Array() { $arr = array(42, true, array(3.14159), array()); $expected = <<<EOD ARRAY(4) [ [0] => INT(42) [1] => TRUE [2] => ARRAY(1) [ [0] => FLOAT(3.14159) ] [3] => ARRAY(0) [] ] EOD; $this->assertEqual($expected, lmb_var_dump($arr)); }