v7‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT home/ajdemo/public_html/mempro/library/Am/Mvc/Helper/Url.php000064400000007666152101643060017771 0ustar00request; if (null === $controller) { $controller = $request->getControllerName(); } if (null === $module) { $module = $request->getModuleName(); } $url = $controller . '/' . $action; if ($module != 'default') { $url = $module . '/' . $url; } if (defined('REL_ROOT_URL')) { $url = REL_ROOT_URL . '/' . $url; } if (null !== $params) { $paramPairs = array(); foreach ($params as $key => $value) { $paramPairs[] = urlencode($key) . '/' . urlencode($value); } $paramString = implode('/', $paramPairs); $url .= '/' . $paramString; } $url = '/' . ltrim($url, '/'); return $url; } /** * Assembles a URL based on a given route * * This method will typically be used for more complex operations, as it * ties into the route objects registered with the router. * * @param array $urlOptions Options passed to the assemble method of the Route object. * @param mixed $name The name of a Route to use. If null it will use the current Route * @param boolean $reset * @param boolean $encode * @return string Url for the link href attribute. */ public function url($urlOptions = array(), $name = null, $reset = false, $encode = true) { $router = Am_Di::getInstance()->router; return $router->assemble($urlOptions, $name, $reset, $encode); } /** * Perform helper when called as $this->_helper->overrideUrl() from an action controller * * Proxies to {@link simple()} * * @param string $action * @param string $controller * @param string $module * @param array $params * @return string */ public function direct($action, $controller = null, $module = null, array $params = null) { return $this->simple($action, $controller, $module, $params); } public function rurl($path, $params = null, $encode = true) { return call_user_func(Am_Di::getInstance()->url, $path, $params, $encode, 2); } public function surl($path, $params = null, $encode = true) { return call_user_func(Am_Di::getInstance()->url, $path, $params, $encode, 1); } /** * Return URL for given path like 'cart/view-basket' * @param array|string $path if array passed, it will call vsprintf for array * @param type $params GET params to add into path * @param type $encode HTML-encode resulting string * @param type $absolute If true, it will return ROOT_SURL, if false -> REL_ROOT_URL, if 2 -> ROOT_URL */ function __invoke($path, $params = null, $encode = true, $absolute = false) { if (is_bool($params)) { $encode = $params; } switch ((int)$absolute) { case 2: $root = ROOT_URL; break; case 1: $root = ROOT_SURL; break; default: $root = REL_ROOT_URL; } if (is_array($path)) { $p = array_shift($path); $path = vsprintf($p, $path); } $url = $root; if ($path) $url .= '/' . $path; if (is_array($params)) $params = http_build_query($params, '', '&'); if (is_string($params) && $params!='') $url .= '?' . $params; if ($encode) $url = Am_Html::escape($url); return $url; } }home/ajdemo/public_html/mempro/library/Zend/View/Helper/Url.php000064400000003514152101700250020500 0ustar00getRouter(); return $router->assemble($urlOptions, $name, $reset, $encode); } }