Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationMain
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cUriBuilderMR
  • ModRewrite
  • ModRewrite_ContentController
  • ModRewrite_ContentExpertController
  • ModRewrite_ContentTestController
  • ModRewrite_ControllerAbstract
  • ModRewriteBase
  • ModRewriteController
  • ModRewriteDebugger
  • ModRewriteTest
  • ModRewriteUrlStack
  • ModRewriteUrlUtil

Functions

  • mr_arrayValue
  • mr_buildGeneratedCode
  • mr_buildNewUrl
  • mr_conCopyArtLang
  • mr_conMoveArticles
  • mr_conSaveArticle
  • mr_conSyncArticle
  • mr_debugOutput
  • mr_getConfiguration
  • mr_getRequest
  • mr_header
  • mr_i18n
  • mr_loadConfiguration
  • mr_queryAndNextRecord
  • mr_removeMultipleChars
  • mr_requestCleanup
  • mr_runFrontendController
  • mr_setClientLanguageId
  • mr_setConfiguration
  • mr_strCopyCategory
  • mr_strMovedownCategory
  • mr_strMoveSubtree
  • mr_strMoveUpCategory
  • mr_strNewCategory
  • mr_strNewTree
  • mr_strRenameCategory
  • mr_strSyncCategory
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: /**
  3:  * AMR controller class
  4:  *
  5:  * @package     Plugin
  6:  * @subpackage  ModRewrite
  7:  * @version     SVN Revision $Rev:$
  8:  * @id          $Id: class.modrewritecontroller.php 5295 2013-08-08 13:16:42Z xmurrix $:
  9:  * @author      Murat Purc <murat@purc.de>
 10:  * @copyright   four for business AG <www.4fb.de>
 11:  * @license     http://www.contenido.org/license/LIZENZ.txt
 12:  * @link        http://www.4fb.de
 13:  * @link        http://www.contenido.org
 14:  */
 15: 
 16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 17: 
 18: /**
 19:  * Mod Rewrite controller class. Extracts url parts and sets some necessary globals like:
 20:  * - $idart
 21:  * - $idcat
 22:  * - $client
 23:  * - $changeclient
 24:  * - $lang
 25:  * - $changelang
 26:  *
 27:  * @author      Murat Purc <murat@purc.de>
 28:  * @package     Plugin
 29:  * @subpackage  ModRewrite
 30:  */
 31: class ModRewriteController extends ModRewriteBase {
 32:     // Error constants
 33: 
 34:     const ERROR_CLIENT = 1;
 35:     const ERROR_LANGUAGE = 2;
 36:     const ERROR_CATEGORY = 3;
 37:     const ERROR_ARTICLE = 4;
 38:     const ERROR_POST_VALIDATION = 5;
 39:     const FRONT_CONTENT = 'front_content.php';
 40: 
 41:     /**
 42:      * Extracted request uri path parts by path separator '/'
 43:      *
 44:      * @var array
 45:      */
 46:     private $_aParts;
 47: 
 48:     /**
 49:      * Extracted article name from request uri
 50:      *
 51:      * @var string
 52:      */
 53:     private $_sArtName;
 54: 
 55:     /**
 56:      * Remaining path for path resolver (see $GLOBALS['path'])
 57:      *
 58:      * @var string
 59:      */
 60:     private $_sPath;
 61: 
 62:     /**
 63:      * Incomming URL
 64:      *
 65:      * @var string
 66:      */
 67:     private $_sIncommingUrl;
 68: 
 69:     /**
 70:      * Resolved URL
 71:      *
 72:      * @var string
 73:      */
 74:     private $_sResolvedUrl;
 75: 
 76:     /**
 77:      * Client id used by this class
 78:      *
 79:      * @var int
 80:      */
 81:     private $_iClientMR;
 82: 
 83:     /**
 84:      * Language id used by this class
 85:      *
 86:      * @var int
 87:      */
 88:     private $_iLangMR;
 89: 
 90:     /**
 91:      * Flag about occured errors
 92:      *
 93:      * @var bool
 94:      */
 95:     private $_bError = false;
 96: 
 97:     /**
 98:      * One of ERROR_* constants or 0
 99:      *
100:      * @var int
101:      */
102:     private $_iError = 0;
103: 
104:     /**
105:      * Flag about found routing definition
106:      *
107:      * @var bool
108:      */
109:     private $_bRoutingFound = false;
110: 
111:     /**
112:      * Constructor, sets several properties.
113:      *
114:      * @param  string  $incommingUrl  Incomming URL
115:      */
116:     public function __construct($incommingUrl) {
117: 
118:         // CON-1266 make incomming URL lowercase if option "URLS to
119:         // lowercase" is set
120:         if (1 == $this->getConfig('use_lowercase_uri')) {
121:             $incommingUrl = strtolower($incommingUrl);
122:         }
123: 
124:         $this->_sIncommingUrl = $incommingUrl;
125:         $this->_aParts = array();
126:         $this->_sArtName = '';
127:     }
128: 
129:     /**
130:      * Getter for overwritten client id (see $GLOBALS['client'])
131:      *
132:      * @return  int  Client id
133:      */
134:     public function getClient() {
135:         return $GLOBALS['client'];
136:     }
137: 
138:     /**
139:      * Getter for overwritten change client id (see $GLOBALS['changeclient'])
140:      *
141:      * @return  int  Change client id
142:      */
143:     public function getChangeClient() {
144:         return $GLOBALS['changeclient'];
145:     }
146: 
147:     /**
148:      * Getter for article id (see $GLOBALS['idart'])
149:      *
150:      * @return  int  Article id
151:      */
152:     public function getIdArt() {
153:         return $GLOBALS['idart'];
154:     }
155: 
156:     /**
157:      * Getter for category id (see $GLOBALS['idcat'])
158:      *
159:      * @return  int  Category id
160:      */
161:     public function getIdCat() {
162:         return $GLOBALS['idcat'];
163:     }
164: 
165:     /**
166:      * Getter for language id (see $GLOBALS['lang'])
167:      *
168:      * @return  int  Language id
169:      */
170:     public function getLang() {
171:         return $GLOBALS['lang'];
172:     }
173: 
174:     /**
175:      * Getter for change language id (see $GLOBALS['changelang'])
176:      *
177:      * @return  int  Change language id
178:      */
179:     public function getChangeLang() {
180:         return $GLOBALS['changelang'];
181:     }
182: 
183:     /**
184:      * Getter for path (see $GLOBALS['path'])
185:      *
186:      * @return  string  Path, used by path resolver
187:      */
188:     public function getPath() {
189:         return $this->_sPath;
190:     }
191: 
192:     /**
193:      * Getter for resolved url
194:      *
195:      * @return  string  Resolved url
196:      */
197:     public function getResolvedUrl() {
198:         return $this->_sResolvedUrl;
199:     }
200: 
201:     /**
202:      * Returns a flag about found routing definition
203:      *
204:      * return  bool  Flag about found routing
205:      */
206:     public function getRoutingFoundState() {
207:         return $this->_bRoutingFound;
208:     }
209: 
210:     /**
211:      * Getter for occured error state
212:      *
213:      * @return  bool  Flag for occured error
214:      */
215:     public function errorOccured() {
216:         return $this->_bError;
217:     }
218: 
219:     /**
220:      * Getter for occured error state
221:      *
222:      * @return  int  Numeric error code
223:      */
224:     public function getError() {
225:         return $this->_iError;
226:     }
227: 
228:     /**
229:      * Main function to call for mod rewrite related preprocessing jobs.
230:      *
231:      * Executes some private functions to extract request URI and to set needed membervariables
232:      * (client, language, article id, category id, etc.)
233:      */
234:     public function execute() {
235:         if (parent::isEnabled() == false) {
236:             return;
237:         }
238: 
239:         $this->_extractRequestUri();
240: 
241:         $this->_initializeClientId();
242: 
243:         $this->_setClientId();
244: 
245:         mr_loadConfiguration($this->_iClientMR);
246: 
247:         $this->_setLanguageId();
248: 
249:         // second call after setting client and language
250:         $this->_extractRequestUri(true);
251: 
252:         $this->_setPathresolverSetting();
253: 
254:         $this->_setIdart();
255: 
256:         ModRewriteDebugger::add($this->_aParts, 'ModRewriteController::execute() _setIdart');
257: 
258:         $this->_postValidation();
259:     }
260: 
261:     /**
262:      * Extracts request URI and sets member variables $this->_sArtName and $this->_aParts
263:      *
264:      * @param  bool $secondCall  Flag about second call of this function, is needed
265:      *                           to re extract url if a routing definition was found
266:      */
267:     private function _extractRequestUri($secondCall = false) {
268:         global $client;
269: 
270:         // get REQUEST_URI
271:         $requestUri = $_SERVER['REQUEST_URI'];
272:         // CON-1178 use REDIRECT_URL if set
273:         if (array_key_exists('REDIRECT_URL', $_SERVER)) {
274:             $requestUri = $_SERVER['REDIRECT_URL'];
275:             if (array_key_exists('REDIRECT_QUERY_STRING', $_SERVER)) {
276:                 $requestUri .= '?' . $_SERVER['REDIRECT_QUERY_STRING'];
277:             }
278:         }
279:         // CON-1266 make request URL lowercase if option "URLS to
280:         // lowercase" is set
281:         if (1 == $this->getConfig('use_lowercase_uri')) {
282:             $requestUri = strtolower($requestUri);
283:         }
284: 
285:         // check for defined rootdir
286:         if (parent::getConfig('rootdir') !== '/' && strpos($requestUri, $this->_sIncommingUrl) === 0) {
287:             $this->_sIncommingUrl = str_replace(parent::getConfig('rootdir'), '/', $this->_sIncommingUrl);
288:         }
289: 
290:         $aUrlComponents = $this->_parseUrl($this->_sIncommingUrl);
291:         if (isset($aUrlComponents['path'])) {
292:             if (parent::getConfig('rootdir') !== '/' && strpos($aUrlComponents['path'], parent::getConfig('rootdir')) === 0) {
293:                 $aUrlComponents['path'] = str_replace(parent::getConfig('rootdir'), '/', $aUrlComponents['path']);
294:             }
295: 
296:             if ($secondCall == true) {
297: 
298:                 // @todo: implement real redirect of old front_content.php style urls
299:                 // check for routing definition
300:                 $routings = parent::getConfig('routing');
301:                 if (is_array($routings) && isset($routings[$aUrlComponents['path']])) {
302:                     $aUrlComponents['path'] = $routings[$aUrlComponents['path']];
303:                     if (strpos($aUrlComponents['path'], self::FRONT_CONTENT) !== false) {
304:                         // routing destination contains front_content.php
305: 
306:                         $this->_bRoutingFound = true;
307: 
308:                         // set client language, if not set before
309:                         mr_setClientLanguageId($client);
310: 
311:                         //rebuild URL
312:                         $url = mr_buildNewUrl($aUrlComponents['path']);
313: 
314:                         $aUrlComponents = $this->_parseUrl($url);
315: 
316:                         // add query parameter to superglobal _GET
317:                         if (isset($aUrlComponents['query'])) {
318:                             $vars = null;
319:                             parse_str($aUrlComponents['query'], $vars);
320:                             $_GET = array_merge($_GET, $vars);
321:                         }
322: 
323:                         $this->_aParts = array();
324:                     }
325:                 } else {
326:                     return;
327:                 }
328:             }
329: 
330:             $aPaths = explode('/', $aUrlComponents['path']);
331:             foreach ($aPaths as $p => $item) {
332:                 if (!empty($item)) {
333:                     // pathinfo would also work
334:                     $arr = explode('.', $item);
335:                     $count = count($arr);
336:                     if ($count > 0 && '.' . strtolower($arr[$count - 1]) == parent::getConfig('file_extension')) {
337:                         array_pop($arr);
338:                         $this->_sArtName = trim(implode('.', $arr));
339:                     } else {
340:                         $this->_aParts[] = $item;
341:                     }
342:                 }
343:             }
344: 
345:             if ($secondCall == true) {
346:                 // reprocess extracting client and language
347:                 $this->_setClientId();
348:                 mr_loadConfiguration($this->_iClientMR);
349:                 $this->_setLanguageId();
350:             }
351:         }
352:         ModRewriteDebugger::add($this->_aParts, 'ModRewriteController::_extractRequestUri() $this->_aParts');
353: 
354:         // loop parts array and remove existing 'front_content.php'
355:         if ($this->_hasPartArrayItems()) {
356:             foreach ($this->_aParts as $p => $item) {
357:                 if ($item == self::FRONT_CONTENT) {
358:                     unset($this->_aParts[$p]);
359:                 }
360:             }
361:         }
362:     }
363: 
364:     /**
365:      * Tries to initialize the client id.
366:      * This is required to load the proper plugin configuration for current client.
367:      */
368:     private function _initializeClientId() {
369:         global $client, $changeclient, $load_client;
370: 
371:         $iClient = (isset($client) && (int) $client > 0) ? $client : 0;
372:         $iChangeClient = (isset($changeclient) && (int) $changeclient > 0) ? $changeclient : 0;
373:         $iLoadClient = (isset($load_client) && (int) $load_client > 0) ? $load_client : 0;
374: 
375:         $this->_iClientMR = 0;
376:         if ($iClient > 0 && $iChangeClient == 0) {
377:             $this->_iClientMR = $iClient;
378:         } elseif ($iChangeClient > 0) {
379:             $this->_iClientMR = $iChangeClient;
380:         } else {
381:             $this->_iClientMR = $iLoadClient;
382:         }
383: 
384:         if ((int) $this->_iClientMR > 0) {
385:             // set global client variable
386:             $client = (int) $this->_iClientMR;
387:         }
388:     }
389: 
390:     /**
391:      * Tries to initialize the language id.
392:      */
393:     private function _initializeLanguageId() {
394:         global $lang, $changelang, $load_lang;
395: 
396:         $iLang = (isset($lang) && (int) $lang > 0) ? $lang : 0;
397:         $iChangeLang = (isset($changelang) && (int) $changelang > 0) ? $changelang : 0;
398:         $iLoadLang = (isset($load_lang) && (int) $load_lang > 0) ? $load_lang : 0;
399: 
400:         $this->_iLangMR = 0;
401:         if ($iLang > 0 && $iChangeLang == 0) {
402:             $this->_iLangMR = $iLang;
403:         } elseif ($iChangeLang > 0) {
404:             $this->_iLangMR = $iChangeLang;
405:         } else {
406:             $this->_iLangMR = $iLoadLang;
407:         }
408: 
409:         if ((int) $this->_iLangMR > 0) {
410:             // set global lang variable
411:             $lang = (int) $this->_iLangMR;
412:         }
413:     }
414: 
415:     /**
416:      * Detects client id from given url
417:      */
418:     private function _setClientId() {
419:         global $client;
420: 
421:         if ($this->_bError) {
422:             return;
423:         } elseif ($this->_isRootRequest()) {
424:             // request to root
425:             return;
426:         } elseif (parent::getConfig('use_client') !== 1) {
427:             return;
428:         }
429: 
430:         if (parent::getConfig('use_client_name') == 1) {
431:             $detectedClientId = (int) ModRewrite::getClientId(array_shift($this->_aParts));
432:         } else {
433:             $detectedClientId = (int) array_shift($this->_aParts);
434:             if ($detectedClientId > 0 && !ModRewrite::languageIdExists($detectedClientId)) {
435:                 $detectedClientId = 0;
436:             }
437:         }
438: 
439:         if ($detectedClientId > 0) {
440:             // overwrite existing client variables
441:             $this->_iClientMR = $detectedClientId;
442:             $client = $detectedClientId;
443:         } else {
444:             $this->_setError(self::ERROR_CLIENT);
445:         }
446:     }
447: 
448:     /**
449:      * Sets language id
450:      */
451:     private function _setLanguageId() {
452:         global $lang;
453: 
454:         if ($this->_bError) {
455:             return;
456:         } elseif ($this->_isRootRequest()) {
457:             // request to root
458:             return;
459:         } elseif (parent::getConfig('use_language') !== 1) {
460:             return;
461:         }
462: 
463:         if (parent::getConfig('use_language_name') == 1) {
464:             // thanks to Nicolas Dickinson for multi Client/Language BugFix
465:             $languageName = array_shift($this->_aParts);
466:             $detectedLanguageId = (int) ModRewrite::getLanguageId($languageName, $this->_iClientMR);
467:         } else {
468:             $detectedLanguageId = (int) array_shift($this->_aParts);
469:             if ($detectedLanguageId > 0 && !ModRewrite::clientIdExists($detectedLanguageId)) {
470:                 $detectedLanguageId = 0;
471:             }
472:         }
473: 
474:         if ($detectedLanguageId > 0) {
475:             // overwrite existing language variables
476:             $this->_iLangMR = $detectedLanguageId;
477:             $lang = $detectedLanguageId;
478:         } else {
479:             $this->_setError(self::ERROR_LANGUAGE);
480:         }
481:     }
482: 
483:     /**
484:      * Sets path resolver and category id
485:      */
486:     private function _setPathresolverSetting() {
487:         global $client, $lang, $load_lang, $idcat;
488: 
489:         if ($this->_bError) {
490:             return;
491:         } elseif (!$this->_hasPartArrayItems()) {
492:             return;
493:         }
494: 
495:         $this->_sPath = '/' . implode('/', $this->_aParts) . '/';
496: 
497:         if (!isset($lang) || (int) $lang <= 0) {
498:             if ((int) $load_lang > 0) {
499:                 // load_client is set in __FRONTEND_PATH__/data/config/config.php
500:                 $lang = (int) $load_lang;
501:             } else {
502:                 // get client id from table
503:                 $clCol = new cApiClientLanguageCollection();
504:                 $clCol->setWhere('idclient', $client);
505:                 $clCol->query();
506:                 if (false !== $clItem = $clCol->next()) {
507:                     $lang = $clItem->get('idlang');
508:                 }
509:             }
510:         }
511: 
512:         $idcat = (int) ModRewrite::getCatIdByUrlPath($this->_sPath);
513: 
514:         if ($idcat == 0) {
515:             // category couldn't resolved
516:             $this->_setError(self::ERROR_CATEGORY);
517:             $idcat = null;
518:         } else {
519:             // unset $this->_sPath if $idcat could set, otherwhise it would be resolved again.
520:             unset($this->_sPath);
521:         }
522: 
523:         ModRewriteDebugger::add($idcat, 'ModRewriteController->_setPathresolverSetting $idcat');
524:         ModRewriteDebugger::add($this->_sPath, 'ModRewriteController->_setPathresolverSetting $this->_sPath');
525:     }
526: 
527:     /**
528:      * Sets article id
529:      */
530:     private function _setIdart() {
531:         global $idcat, $idart, $lang;
532: 
533:         if ($this->_bError) {
534:             return;
535:         } else if ($this->_isRootRequest()) {
536:             return;
537:         }
538: 
539:         $iIdCat = (isset($idcat) && (int) $idcat > 0) ? $idcat : 0;
540:         $iIdArt = (isset($idart) && (int) $idart > 0) ? $idart : 0;
541:         $detectedIdart = 0;
542:         $defaultStartArtName = parent::getConfig('default_startart_name');
543:         $currArtName = $this->_sArtName;
544: 
545:         // startarticle name in url
546:         if (parent::getConfig('add_startart_name_to_url') && !empty($currArtName)) {
547:             if ($currArtName == $defaultStartArtName) {
548:                 // stored articlename is the default one, remove it ModRewrite::getArtIdByWebsafeName()
549:                 // will find the real article name
550:                 $currArtName = '';
551:             }
552:         }
553: 
554:         // Last check, before detecting article id
555:         if ($iIdCat == 0 && $iIdArt == 0 && empty($currArtName)) {
556:             // no idcat, idart and article name
557:             // must be a request to root or with language name and/or client name part!
558:             return;
559:         }
560: 
561:         if ($iIdCat > 0 && $iIdArt == 0 && !empty($currArtName)) {
562:             // existing idcat with no idart and with article name
563:             $detectedIdart = (int) ModRewrite::getArtIdByWebsafeName($currArtName, $iIdCat, $lang);
564:         } elseif ($iIdCat > 0 && $iIdArt == 0 && empty($currArtName)) {
565:             if (parent::getConfig('add_startart_name_to_url') && ($currArtName == '' || $defaultStartArtName == '' || $defaultStartArtName == $this->_sArtName)) {
566:                 // existing idcat without idart and without article name or with default start article name
567:                 $catLangColl = new cApiCategoryLanguageCollection();
568:                 $detectedIdart = (int) $catLangColl->getStartIdartByIdcatAndIdlang($iIdCat, $lang);
569:             }
570:         } elseif ($iIdCat == 0 && $iIdArt == 0 && !empty($currArtName)) {
571:             // no idcat and idart but article name
572:             $detectedIdart = (int) ModRewrite::getArtIdByWebsafeName($currArtName, $iIdCat, $lang);
573:         }
574: 
575:         if ($detectedIdart > 0) {
576:             $idart = $detectedIdart;
577:         } elseif (!empty($currArtName)) {
578:             $this->_setError(self::ERROR_ARTICLE);
579:         }
580: 
581:         ModRewriteDebugger::add($detectedIdart, 'ModRewriteController->_setIdart $detectedIdart');
582:     }
583: 
584:     /**
585:      * Does post validation of the extracted data.
586:      *
587:      * One main goal of this function is to prevent duplicated content, which could happen, if
588:      * the configuration 'startfromroot' is activated.
589:      */
590:     private function _postValidation() {
591:         global $idcat, $idart, $client;
592: 
593:         if ($this->_bError || $this->_bRoutingFound || !$this->_hasPartArrayItems()) {
594:             return;
595:         }
596: 
597:         if (parent::getConfig('startfromroot') == 1 && parent::getConfig('prevent_duplicated_content') == 1) {
598: 
599:             // prevention of duplicated content if '/firstcat/' is directly requested!
600: 
601:             $idcat = (isset($idcat) && (int) $idcat > 0) ? $idcat : null;
602:             $idart = (isset($idart) && (int) $idart > 0) ? $idart : null;
603: 
604:             // compose new parameter
605:             $param = '';
606:             if ($idcat) {
607:                 $param .= 'idcat=' . (int) $idcat;
608:             }
609:             if ($idart) {
610:                 $param .= ($param !== '') ? '&idart=' . (int) $idart : 'idart=' . (int) $idart;
611:             }
612: 
613:             if ($param == '') {
614:                 return;
615:             }
616: 
617:             // set client language, if not set before
618:             mr_setClientLanguageId($client);
619: 
620:             //rebuild url
621:             $url = mr_buildNewUrl(self::FRONT_CONTENT . '?' . $param);
622: 
623:             $aUrlComponents = @parse_url($this->_sIncommingUrl);
624:             $incommingUrl = (isset($aUrlComponents['path'])) ? $aUrlComponents['path'] : '';
625: 
626:             ModRewriteDebugger::add($url, 'ModRewriteController->_postValidation validate url');
627:             ModRewriteDebugger::add($incommingUrl, 'ModRewriteController->_postValidation incommingUrl');
628: 
629:             // now the new generated uri should be identical with the request uri
630:             if ($incommingUrl !== $url) {
631:                 $this->_setError(self::ERROR_POST_VALIDATION);
632:                 $idcat = null;
633:             }
634:         }
635:     }
636: 
637:     /**
638:      * Parses the url using defined separators
639:      *
640:      * @param   string  $url  Incoming url
641:      * @return  string  Parsed url
642:      */
643:     private function _parseUrl($url) {
644:         $this->_sResolvedUrl = $url;
645: 
646:         $oMrUrlUtil = ModRewriteUrlUtil::getInstance();
647:         $url = $oMrUrlUtil->toContenidoUrl($url);
648: 
649:         return @parse_url($url);
650:     }
651: 
652:     /**
653:      * Returns state of parts property.
654:      *
655:      * @return  bool  True if $this->_aParts propery contains items
656:      */
657:     private function _hasPartArrayItems() {
658:         return (!empty($this->_aParts));
659:     }
660: 
661:     /**
662:      * Checks if current request was a root request.
663:      *
664:      * @return  bool
665:      */
666:     private function _isRootRequest() {
667:         return ($this->_sIncommingUrl == '/' || $this->_sIncommingUrl == '');
668:     }
669: 
670:     /**
671:      * Sets error code and error flag (everything greater than 0 is an error)
672:      * @param  int  $errCode
673:      */
674:     private function _setError($errCode) {
675:         $this->_iError = (int) $errCode;
676:         $this->_bError = ((int) $errCode > 0);
677:     }
678: 
679: }
CMS CONTENIDO 4.9.0 API documentation generated by ApiGen 2.8.0