Overview

Packages

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