ÿØÿà JFIF    ÿÛ „  ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ     ÿÄ H    !1AQaq"‘¡2B±ÁÑð#R“Ò Tbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz ¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡* ….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±b Lô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊ ÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ." ¤‡ú*õ'VŽ|¼´Úgllº¼klz[Æüï÷Aób‡Eÿ dÑ»Xx9ÃÜ£ÁT/`¼¸vI±Ýµ·Ë‚“G³þ*Ÿû´r|*}<¨îºœ @¦mÄ’M¹”.œ«Y–|6ÏU¤jç¥ÕÞqO ˜kDÆÁ¨5ÿ š;ÐЦ¦€GÙk \ –Þ=â¼=SͧµªS°ÚÍpÜãQűÀõ¬?ÃÁ1Ñ•õZà?hóœ€ L¦l{Y*K˜Ù›zc˜–ˆâ ø+¾ ­-Ök¥%ùEÜA'}ˆ><ÊIè“bpÍ/qÞâvoX€w,\úªò6Z[XdÒæ­@Ö—€$òJí#é>'°Ú ôª˜<)4ryÙ£|óAÅn5žêŸyÒäMÝ2{"}‰–¤l÷ûWX\l¾Á¸góÉOÔ /óñB¤f¸çñ[.P˜ZsÊË*ßT܈§QN¢’¡¨§V¼(Üù*eÕ“”5T¨‹Âê¥FŒã½Dü[8'Ò¥a…Ú¶k7a *•›¼'Ò·\8¨ª\@\õ¢¦íq+DÙrmÎ…_ªæ»ŠÓœ¡¯’Ré9MÅ×D™lælffc+ŒÑ,ý™ÿ ¯þǤ=Å’Á7µ÷ÚÛ/“Ü€ñýã¼àí¾ÕÑ+ƒ,uµMâÀÄbm:ÒÎPæ{˜Gz[ƒ¯«® KHà`ߨŠéí¯P8Aq.C‰ à€kòpj´kN¶qô€…Õ,ÜNŠª-­{Zö’æû44‰sŽè‰îVíRœÕm" 6?³D9¡ÇTíÅꋇ`4«¸ÝÁô ï’ýorqКÇZ«x4Žâéþuïf¹µö[P ,Q£éaX±`PÉÍZ ¸äYúg üAx ’6Lê‚xÝÓ*äQ  Ï’¨hÍ =²,6ï#rÃ<¯–£»ƒ‹,–ê•€ aÛsñ'%Æ"®ÛüìBᝠHÚ3ß°©$“XnœÖ’î2ËTeûìxîß ¦å¿çÉ ðK§þ{‘t‚Ϋ¬jéîZ[ ”š7L¥4VÚCE×]m¤Øy”ä4-dz£œ§¸x.*ãÊÊ b÷•h:©‡¦s`BTÁRû¾g⻩‹jø sF¢àJøFl‘È•Xᓁà~*j¯ +(ÚÕ6-£¯÷GŠØy‚<Ç’.F‹Hœw(+)ÜÜâÈzÄäT§FߘãÏ;DmVœ3Àu@mÚüXÝü•3B¨òÌÁÛ<·ÃÜ z,Ì@õÅ·d2]ü8s÷IôÞ¯^Ç9¢u„~ëAŸï4«M? K]­ÅàPl@s_ p:°¬ZR”´›JC[CS.h‹ƒïËœ«Æ]–÷ó‚wR×k7X‰k›‘´ù¦=¡«‰¨¨Â')—71ó’c‡Ðúµ `é.{§p¹ój\Ž{1h{o±Ý=áUÊïGÖŒõ–-BÄm+AZX¶¡ ïHðæ¥JmÙ;…䡟ˆ¦ ° äšiÉg«$üMk5¤L“’çÊvïâï ,=f“"íἊ5ô¬x6{ɏžID0e¸vçmi'︧ºð9$ò¹÷*£’9ÿ ²TÔ…×>JV¥}Œ}$p[bÔ®*[jzS*8 ”·T›Í–ñUîƒwo$áè=LT™ç—~ô·¤ÈÚ$榍q‰„+´kFm)ž‹©i–ËqÞŠ‰à¶ü( ‚•§ •°ò·‡#5ª•µÊ﯅¡X¨šÁ*F#TXJÊ ušJVÍ&=iÄs1‚3•'fý§5Ñ<=[íÞ­ PÚ;ѱÌ_~Ä££8rÞ ²w;’hDT°>ÈG¬8Á²ÚzŽ®ò®qZcqJêäÞ-ö[ܘbň±çb“ж31²n×iƒðÕ;1¶þÉ ªX‰,ßqÏ$>•î íZ¥Z 1{ç൵+ƒÕµ¥°T$§K]á»Ûï*·¤tMI’ÂZbŽÕiÒ˜}bÓ0£ª5›¨ [5Ž^ÝœWøÂÝh° ¢OWun£¤5 a2Z.G2³YL]jåtì”ä ÁÓ‘%"©<Ôúʰsº UZvä‡ÄiÆÒM .÷V·™ø#kèýiíÌ–ª)µT[)BˆõÑ xB¾B€ÖT¨.¥~ð@VĶr#¸ü*åZNDŽH;âi ],©£öØpù(šºãö¼T.uCê•4@ÿ GÕÛ)Cx›®0ø#:ÏðFÒbR\(€€Ä®fã4Þ‰Fä¯HXƒÅ,†öEÑÔÜ]Öv²?tLÃvBY£ú6Êu5ÅAQ³1‘’¬x–HŒÐ‡ ^ ¸KwJôÖŽ5×CÚ¨vÜ«/B0$×k°=ðbÇ(Ï)w±A†Á† 11Í=èQšµ626ŒÜ/`G«µ<}—-Ö7KEHÈÉðóȤmݱû±·ø«Snmá=“䫚mݱŸ¡¶~ó·“äUóJæúòB|E LêŽy´jDÔ$G¢þÐñ7óR8ýÒ…Ç› WVe#·Ÿ p·Fx~•ݤF÷0Èÿ K¯æS<6’¡WШ; ´ÿ ¥Êø\Òuî†åÝ–VNœkÒ7oòX¨Á­Ø÷FÎÑä±g÷ÿ M~Çî=p,X´ ÝÌÚÅ‹’ÃjÖ.ØöÏñ qïQ¤ÓZE†° =6·]܈ s¸>v•Ž^Ý\wq9r‰Î\¸¡kURÒ$­*‹Nq?Þª*!sŠÆ:TU_u±T+øX¡ ®¹¡,ÄâÃBTsÜ$Ø›4m椴zÜK]’’›Pƒ @€#â˜`é¹=I‡fiV•Ôî“nRm+µFPOhÍ0B£ €+¬5c v•:P'ÒyÎ ‰V~‚Ó†ÖuókDoh$å\*ö%Ю=£«…aȼ½÷Û.-½VŒŠ¼'lyî±1¬3ó#ÞE¿ÔS¤gV£m›=§\û"—WU¤ÚǼÿ ÂnÁGŒÃ ‚õN D³õNÚíŒÕ;HôyÄÈ©P¹Ä{:?R‘Ô¨âF÷ø£bÅó® JS|‚R÷ivýáâ€Æé¡è³´IئÑT!§˜•ت‚¬â@q€wnïCWÄ@JU€ê¯m6]Ï:£âx'+ÒðXvÓ¦Úm=–´7œ $ì“B£~p%ÕŸUþ« N@¼üï~w˜ñø5®—'Ôe»¤5ã//€ž~‰Tþ›Å7•#¤× Íö pÄ$ùeåì*«ÓŠEØWEÈsßg ¦ûvžSsLpºÊW–âµEWöˬH; ™!CYõZ ÃÄf æ#1W. \uWâ\,\Çf j’<qTbên›Î[vxx£ë 'ö¨1›˜ÀM¼Pÿ H)ƒêêŒA7s,|F“ 꺸k³9Ìö*ç®;Ö!Ö$Eiž•¹ÒÚ†ýóéÝû¾ÕS®ó$’NÝäŸz¤5r¦ãÄÃD÷Üø!°ø‡Ô&@m™Ì^Ãä­d q5Lnÿ N;.6½·N|#ä"1Nƒx“ã<3('&ñßt  ~ªu”1Tb㫨9ê–›–bìd$ߣ=#ÕãÒmU¯eí$EFù5ýYô櫨æì™Ç—±ssM]·á¿0ÕåJRÓªîiƒ+O58ÖñªŠÒx" \µâá¨i’¤i —Ö ” M+M¤ë9‚‰A¦°Qõ¾ßøK~¼Ã‘g…Ö´~÷Ï[3GUœÒ½#…kàÔ®Ò”‰³·dWV‰IP‰Ú8u¹”E ÖqLj¾êÕCBš{A^Âß;–¨`¯¬ìö ˼ ×tìø.tƐm*n¨y4o&Àx¥n¦×î‡aupáÛj8¿m›è¶ã!o½;ß0y^ý×^EÑ¿ÒjzŒ­)vÚÑnÄL …^ªô× ‡—‚3k Îý­hï]içå–îÏ*÷ñþ»Ô CÒjøjÍznˆ´ ¹#b'Fô‹ ‰v¥'’à'T´ƒHýÍ%M‰ ƒ&ÆÇŒï1 ‘ –Þ ‰i¬s žR-Ÿ kЬá¬7:þ 0ŒÅÒÕ/aÙ¬ÃÝ#Úøœ ©aiVc‰. ¹¦ãµ” ›Yg¦›ÆÎýº°f³7ƒhá·¸­}&D9¡ÂsÉÙÞèŠõØàC™¨ñbFC|´Ü(ŸƒÚÒ-%»'a Ì¿)ËÇn¿úÿ ÞŽX…4ÊÅH^ôΑí@ù¹Eh¶“L8Çjù ¼ÎåVªóR©Ï5uà V4lZß®=€xÖŸ–ÑÈ ÷”¨°¾__yM1tÉ?uÆþIkÄgæ@þ[¢†°XÃJ£j·:nkÅ¢u ‘}âGzö­/IµèЬ¼48q¦F°ŽR¼=ûì{´¯RýicS ÕÛ íNtÍÙï£,w4rêì®»~x(©Uñ§#Ñ&œÕ¤>ÎåÍÓ9’Ö{9eV­[Öjâ²ãu]˜å2›qÑšÕJç0€sÄ|Êëè0튔bÁ>“{×_F`Ø©ºê:µä,v¤ðfc1±"«ÔÍän1#=· Âøv~H½ÐßA¾¿Ü€Óš]Õ; I¾÷ç‚Qi†î¹9ywÔKG˜áñ zQY—§ÃÕZ07§X‚ Áh;ÁM)iÌCH-¯T‘ë|A0{Ò½LÚ–TâÖkÜ’dÀ“rmm»”جPF³ÖcbE§T€ÒxKºû’Ó®7±²(\4ŽÃ¸Uu@j™yĵ;³µ!Á¢b.W¤=mõ´êµK k ¸K^ÜÛ#p*Ü14qkZç5ïë †°5Ï%ÍÛ<Õ¤×Ô¥ê†C Õ´¼ú$ƒÖ“”]Ù¬qÞÚ[4©ý!ûÏ—Áb쳐XµA¬â~`›Çr¸8ìùÝ䫦<>ä÷«?xs´ÇÑ /á;¹øüÊÈÙà{"@Žïzâ¬[âß‚ U_<ÇŸ½4èN˜ú61®qŠu ¦þF£»äJ_ˆÙÎ~ ÞAã–݄ϗrŠD;xTž‘ô`É«…suãO`?³à™ô Lý#Íc5öoæØ‚y´´÷«ZR§<&JÇ+éâô´€i!Àˆ0æAoàðLèÖ-2ŸõW.’t^–(KÁmHµV@xÜÇy®Ñø­â^:Ú3w· 7½¹°ñ¸â¹®:',«Mœ—n­Á+Ãbš LÈ‘ÄnRÓÅœ%¦²‰¨ùQ:¤f‚ "PÕtô¸…cæl…&˜Ú˜Ôkv‹ž+vŠ,=¢v­6—Xy*¥t£«<™:“aîϲ=¦6rO]XI¿Œ÷¤zÚ­›¶ 6÷”w\d ü~v®ˆÌk«^m<ÿ ¢‰Õ\)ùºŽ;… lîÙÅEŠ®cѾ@vnMÏ,¼“ñ•ŽBxðÃzãÇç%3ˆ"}Ù•Åî> BÉú;Ò]V+P˜F_´ßé> Øše|ï‡ÄOmFæÇ ãqÞ$/xÐx­z`ï9"œÜij‚!7.\Td…9M‡•iŽ‹¾‘50ÞŽn¥ß4ÉôO ¹*í^QêËÜÇÌ8=ާs‰'ÂëÙ«á%Pú[O †ÅP¯Vsް.‰,kc¶ ¬A9n˜XÎ-ÞšN["¹QÕ‰ƒMýÁߺXJæÍaLj¾×Ãmã¾ãÚ uñÒþåQô¦¥ /ÄUx:‚ÍÜ’ Đ©ØÝ3V¨‰ÕnÐ6ó*óúK­«…c ¯U òhsý­jóÔj#,ímŒRµ«lbïUTŒÑ8†Ä0œÏr`ð¡¬É Ї ë"À² ™ 6¥ f¶ ¢ÚoܱԷ-<Àî)†a¶ž'Ú»¨TXqØæ¶÷YÄHy˜9ÈIW­YÀuMFë ºÏ’AqÌ4·/Ú †ô'i$øä­=Ä Ý|öK×40è|È6p‘0§)o¥ctî§H+CA-“ xØ|ÐXАç l8íºð3Ø:³¤¬KX¯UÿÙ app = $app ?: CMSApplication::getInstance('site'); $this->menu = $menu ?: $this->app->getMenu(); } /** * Function to convert a route to an internal URI * * @param \JUri &$uri The uri. * * @return array * * @since 1.5 */ public function parse(&$uri) { $vars = array(); if ($this->app->get('force_ssl') == 2 && strtolower($uri->getScheme()) !== 'https') { // Forward to https $uri->setScheme('https'); $this->app->redirect((string) $uri, 301); } // Get the path // Decode URL to convert percent-encoding to unicode so that strings match when routing. $path = urldecode($uri->getPath()); // Remove the base URI path. $path = substr_replace($path, '', 0, strlen(\JUri::base(true))); // Check to see if a request to a specific entry point has been made. if (preg_match("#.*?\.php#u", $path, $matches)) { // Get the current entry point path relative to the site path. $scriptPath = realpath($_SERVER['SCRIPT_FILENAME'] ?: str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED'])); $relativeScriptPath = str_replace('\\', '/', str_replace(JPATH_SITE, '', $scriptPath)); // If a php file has been found in the request path, check to see if it is a valid file. // Also verify that it represents the same file from the server variable for entry script. if (file_exists(JPATH_SITE . $matches[0]) && ($matches[0] === $relativeScriptPath)) { // Remove the entry point segments from the request path for proper routing. $path = str_replace($matches[0], '', $path); } } // Identify format if ($this->_mode == JROUTER_MODE_SEF) { if ($this->app->get('sef_suffix') && !(substr($path, -9) === 'index.php' || substr($path, -1) === '/')) { if ($suffix = pathinfo($path, PATHINFO_EXTENSION)) { $vars['format'] = $suffix; } } } // Set the route $uri->setPath(trim($path, '/')); // Set the parsepreprocess components methods $components = ComponentHelper::getComponents(); foreach ($components as $component) { $componentRouter = $this->getComponentRouter($component->option); if (method_exists($componentRouter, 'parsepreprocess')) { $this->attachParseRule(array($componentRouter, 'parsepreprocess'), static::PROCESS_BEFORE); } } $vars += parent::parse($uri); return $vars; } /** * Function to convert an internal URI to a route * * @param string $url The internal URL * * @return string The absolute search engine friendly URL * * @since 1.5 */ public function build($url) { $uri = parent::build($url); // Get the path data $route = $uri->getPath(); // Add the suffix to the uri if ($this->_mode == JROUTER_MODE_SEF && $route) { if ($this->app->get('sef_suffix') && !(substr($route, -9) === 'index.php' || substr($route, -1) === '/')) { if ($format = $uri->getVar('format', 'html')) { $route .= '.' . $format; $uri->delVar('format'); } } if ($this->app->get('sef_rewrite')) { // Transform the route if ($route === 'index.php') { $route = ''; } else { $route = str_replace('index.php/', '', $route); } } } // Add basepath to the uri $uri->setPath(\JUri::base(true) . '/' . $route); return $uri; } /** * Function to convert a raw route to an internal URI * * @param \JUri &$uri The raw route * * @return array * * @since 3.2 * @deprecated 4.0 Attach your logic as rule to the main parse stage */ protected function parseRawRoute(&$uri) { $vars = array(); // Handle an empty URL (special case) if (!$uri->getVar('Itemid') && !$uri->getVar('option')) { $item = $this->menu->getDefault($this->app->getLanguage()->getTag()); if (!is_object($item)) { // No default item set return $vars; } // Set the information in the request $vars = $item->query; // Get the itemid $vars['Itemid'] = $item->id; // Set the active menu item $this->menu->setActive($vars['Itemid']); return $vars; } // Get the variables from the uri $this->setVars($uri->getQuery(true)); // Get the itemid, if it hasn't been set force it to null $this->setVar('Itemid', $this->app->input->getInt('Itemid', null)); // Only an Itemid OR if filter language plugin set? Get the full information from the itemid if (count($this->getVars()) === 1 || ($this->app->getLanguageFilter() && count($this->getVars()) === 2)) { $item = $this->menu->getItem($this->getVar('Itemid')); if ($item && $item->type == 'alias') { $newItem = $this->menu->getItem($item->params->get('aliasoptions')); if ($newItem) { $item->query = array_merge($item->query, $newItem->query); $item->component = $newItem->component; } } if ($item !== null && is_array($item->query)) { $vars += $item->query; } } // Set the active menu item $this->menu->setActive($this->getVar('Itemid')); return $vars; } /** * Function to convert a sef route to an internal URI * * @param \JUri &$uri The sef URI * * @return string Internal URI * * @since 3.2 * @deprecated 4.0 Attach your logic as rule to the main parse stage */ protected function parseSefRoute(&$uri) { $route = $uri->getPath(); // Remove the suffix if ($this->app->get('sef_suffix')) { if ($suffix = pathinfo($route, PATHINFO_EXTENSION)) { $route = str_replace('.' . $suffix, '', $route); } } // Get the variables from the uri $vars = $uri->getQuery(true); // Handle an empty URL (special case) if (empty($route)) { // If route is empty AND option is set in the query, assume it's non-sef url, and parse apropriately if (isset($vars['option']) || isset($vars['Itemid'])) { return $this->parseRawRoute($uri); } $item = $this->menu->getDefault($this->app->getLanguage()->getTag()); // If user not allowed to see default menu item then avoid notices if (is_object($item)) { // Set query variables of default menu item into the request, but keep existing request variables $vars = array_merge($vars, $item->query); // Get the itemid $vars['Itemid'] = $item->id; // Set the active menu item $this->menu->setActive($vars['Itemid']); $this->setVars($vars); } return $vars; } // Parse the application route $segments = explode('/', $route); if (count($segments) > 1 && $segments[0] === 'component') { $vars['option'] = 'com_' . $segments[1]; $vars['Itemid'] = null; $route = implode('/', array_slice($segments, 2)); } else { // Get menu items. $items = $this->menu->getMenu(); $found = false; $route_lowercase = StringHelper::strtolower($route); $lang_tag = $this->app->getLanguage()->getTag(); // Iterate through all items and check route matches. foreach ($items as $item) { if ($item->route && StringHelper::strpos($route_lowercase . '/', $item->route . '/') === 0 && $item->type !== 'menulink') { // Usual method for non-multilingual site. if (!$this->app->getLanguageFilter()) { // Exact route match. We can break iteration because exact item was found. if ($item->route === $route_lowercase) { $found = $item; break; } // Partial route match. Item with highest level takes priority. if (!$found || $found->level < $item->level) { $found = $item; } } // Multilingual site. elseif ($item->language === '*' || $item->language === $lang_tag) { // Exact route match. if ($item->route === $route_lowercase) { $found = $item; // Break iteration only if language is matched. if ($item->language === $lang_tag) { break; } } // Partial route match. Item with highest level or same language takes priority. if (!$found || $found->level < $item->level || $item->language === $lang_tag) { $found = $item; } } } } if (!$found) { $found = $this->menu->getDefault($lang_tag); } else { $route = substr($route, strlen($found->route)); if ($route) { $route = substr($route, 1); } } if ($found) { if ($found->type == 'alias') { $newItem = $this->menu->getItem($found->params->get('aliasoptions')); if ($newItem) { $found->query = array_merge($found->query, $newItem->query); $found->component = $newItem->component; } } $vars['Itemid'] = $found->id; $vars['option'] = $found->component; } } // Set the active menu item if (isset($vars['Itemid'])) { $this->menu->setActive($vars['Itemid']); } // Set the variables $this->setVars($vars); // Parse the component route if (!empty($route) && isset($this->_vars['option'])) { $segments = explode('/', $route); if (empty($segments[0])) { array_shift($segments); } // Handle component route $component = preg_replace('/[^A-Z0-9_\.-]/i', '', $this->_vars['option']); if (count($segments)) { $crouter = $this->getComponentRouter($component); $vars = $crouter->parse($segments); $this->setVars($vars); } $route = implode('/', $segments); } else { // Set active menu item if ($item = $this->menu->getActive()) { $vars = $item->query; } } $uri->setPath($route); return $vars; } /** * Function to build a raw route * * @param \JUri &$uri The internal URL * * @return string Raw Route * * @since 3.2 * @deprecated 4.0 Attach your logic as rule to the main build stage */ protected function buildRawRoute(&$uri) { // Get the query data $query = $uri->getQuery(true); if (!isset($query['option'])) { return; } $component = preg_replace('/[^A-Z0-9_\.-]/i', '', $query['option']); $crouter = $this->getComponentRouter($component); $query = $crouter->preprocess($query); $uri->setQuery($query); } /** * Function to build a sef route * * @param \JUri &$uri The internal URL * * @return void * * @since 1.5 * @deprecated 4.0 Attach your logic as rule to the main build stage * @codeCoverageIgnore */ protected function _buildSefRoute(&$uri) { $this->buildSefRoute($uri); } /** * Function to build a sef route * * @param \JUri &$uri The uri * * @return void * * @since 3.2 * @deprecated 4.0 Attach your logic as rule to the main build stage */ protected function buildSefRoute(&$uri) { // Get the route $route = $uri->getPath(); // Get the query data $query = $uri->getQuery(true); if (!isset($query['option'])) { return; } // Build the component route $component = preg_replace('/[^A-Z0-9_\.-]/i', '', $query['option']); $itemID = !empty($query['Itemid']) ? $query['Itemid'] : null; $crouter = $this->getComponentRouter($component); $parts = $crouter->build($query); $result = implode('/', $parts); $tmp = ($result !== '') ? $result : ''; // Build the application route $built = false; if (!empty($query['Itemid'])) { $item = $this->menu->getItem($query['Itemid']); if (is_object($item) && $query['option'] === $item->component) { if (!$item->home) { $tmp = !empty($tmp) ? $item->route . '/' . $tmp : $item->route; } $built = true; } } if (empty($query['Itemid']) && !empty($itemID)) { $query['Itemid'] = $itemID; } if (!$built) { $tmp = 'component/' . substr($query['option'], 4) . '/' . $tmp; } if ($tmp) { $route .= '/' . $tmp; } // Unset unneeded query information if (isset($item) && $query['option'] === $item->component) { unset($query['Itemid']); } unset($query['option']); // Set query again in the URI $uri->setQuery($query); $uri->setPath($route); } /** * Process the parsed router variables based on custom defined rules * * @param \JUri &$uri The URI to parse * @param string $stage The stage that should be processed. * Possible values: 'preprocess', 'postprocess' * and '' for the main parse stage * * @return array The array of processed URI variables * * @since 3.2 */ protected function processParseRules(&$uri, $stage = self::PROCESS_DURING) { // Process the attached parse rules $vars = parent::processParseRules($uri, $stage); if ($stage === self::PROCESS_DURING) { // Process the pagination support if ($this->_mode == JROUTER_MODE_SEF) { $start = $uri->getVar('start'); if ($start !== null) { $uri->delVar('start'); $vars['limitstart'] = $start; } } } return $vars; } /** * Process the build uri query data based on custom defined rules * * @param \JUri &$uri The URI * @param string $stage The stage that should be processed. * Possible values: 'preprocess', 'postprocess' * and '' for the main build stage * * @return void * * @since 3.2 * @deprecated 4.0 The special logic should be implemented as rule */ protected function processBuildRules(&$uri, $stage = self::PROCESS_DURING) { if ($stage === self::PROCESS_DURING) { // Make sure any menu vars are used if no others are specified $query = $uri->getQuery(true); if ($this->_mode != 1 && isset($query['Itemid']) && (count($query) === 2 || (count($query) === 3 && isset($query['lang'])))) { // Get the active menu item $itemid = $uri->getVar('Itemid'); $lang = $uri->getVar('lang'); $item = $this->menu->getItem($itemid); if ($item) { $uri->setQuery($item->query); } $uri->setVar('Itemid', $itemid); if ($lang) { $uri->setVar('lang', $lang); } } } // Process the attached build rules parent::processBuildRules($uri, $stage); if ($stage === self::PROCESS_BEFORE) { // Get the query data $query = $uri->getQuery(true); if (!isset($query['option'])) { return; } // Build the component route $component = preg_replace('/[^A-Z0-9_\.-]/i', '', $query['option']); $router = $this->getComponentRouter($component); $query = $router->preprocess($query); $uri->setQuery($query); } if ($stage === self::PROCESS_DURING) { // Get the path data $route = $uri->getPath(); if ($this->_mode == JROUTER_MODE_SEF && $route) { $limitstart = $uri->getVar('limitstart'); if ($limitstart !== null) { $uri->setVar('start', (int) $limitstart); $uri->delVar('limitstart'); } } $uri->setPath($route); } } /** * Create a uri based on a full or partial URL string * * @param string $url The URI * * @return \JUri * * @since 3.2 */ protected function createUri($url) { // Create the URI $uri = parent::createUri($url); // Get the itemid form the URI $itemid = $uri->getVar('Itemid'); if ($itemid === null) { if ($option = $uri->getVar('option')) { $item = $this->menu->getItem($this->getVar('Itemid')); if ($item !== null && $item->component === $option) { $uri->setVar('Itemid', $item->id); } } else { if ($option = $this->getVar('option')) { $uri->setVar('option', $option); } if ($itemid = $this->getVar('Itemid')) { $uri->setVar('Itemid', $itemid); } } } else { if (!$uri->getVar('option')) { if ($item = $this->menu->getItem($itemid)) { $uri->setVar('option', $item->component); } } } return $uri; } /** * Get component router * * @param string $component Name of the component including com_ prefix * * @return RouterInterface Component router * * @since 3.3 */ public function getComponentRouter($component) { if (!isset($this->componentRouters[$component])) { $compname = ucfirst(substr($component, 4)); $class = $compname . 'Router'; if (!class_exists($class)) { // Use the component routing handler if it exists $path = JPATH_SITE . '/components/' . $component . '/router.php'; // Use the custom routing handler if it exists if (file_exists($path)) { require_once $path; } } if (class_exists($class)) { $reflection = new \ReflectionClass($class); if (in_array('Joomla\\CMS\\Component\\Router\\RouterInterface', $reflection->getInterfaceNames())) { $this->componentRouters[$component] = new $class($this->app, $this->menu); } } if (!isset($this->componentRouters[$component])) { $this->componentRouters[$component] = new RouterLegacy($compname); } } return $this->componentRouters[$component]; } /** * Set a router for a component * * @param string $component Component name with com_ prefix * @param object $router Component router * * @return boolean True if the router was accepted, false if not * * @since 3.3 */ public function setComponentRouter($component, $router) { $reflection = new \ReflectionClass($router); if (in_array('Joomla\\CMS\\Component\\Router\\RouterInterface', $reflection->getInterfaceNames())) { $this->componentRouters[$component] = $router; return true; } else { return false; } } }