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
    • 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 5599 2013-09-30 16:14:38Z marcus.gnass $:
  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-1266 make request URL lowercase if option "URLS to
273:         // lowercase" is set
274:         if (1 == $this->getConfig('use_lowercase_uri')) {
275:             $requestUri = strtolower($requestUri);
276:         }
277: 
278:         // check for defined rootdir
279:         // allows for root dir being alternativly defined as path of setting client/%frontend_path%
280:         $rootdir = cUriBuilderMR::getMultiClientRootDir(parent::getConfig('rootdir'));
281:         if ('/' !==  $rootdir && 0 === strpos($requestUri, $this->_sIncommingUrl)) {
282:             $this->_sIncommingUrl = str_replace($rootdir, '/', $this->_sIncommingUrl);
283:         }
284: 
285:         $aUrlComponents = $this->_parseUrl($this->_sIncommingUrl);
286:         if (isset($aUrlComponents['path'])) {
287:             if (parent::getConfig('rootdir') !== '/' && strpos($aUrlComponents['path'], parent::getConfig('rootdir')) === 0) {
288:                 $aUrlComponents['path'] = str_replace(parent::getConfig('rootdir'), '/', $aUrlComponents['path']);
289:             }
290: 
291:             if ($secondCall == true) {
292: 
293:                 // @todo: implement real redirect of old front_content.php style urls
294:                 // check for routing definition
295:                 $routings = parent::getConfig('routing');
296:                 if (is_array($routings) && isset($routings[$aUrlComponents['path']])) {
297:                     $aUrlComponents['path'] = $routings[$aUrlComponents['path']];
298:                     if (strpos($aUrlComponents['path'], self::FRONT_CONTENT) !== false) {
299:                         // routing destination contains front_content.php
300: 
301:                         $this->_bRoutingFound = true;
302: 
303:                         // set client language, if not set before
304:                         mr_setClientLanguageId($client);
305: 
306:                         //rebuild URL
307:                         $url = mr_buildNewUrl($aUrlComponents['path']);
308: 
309:                         $aUrlComponents = $this->_parseUrl($url);
310: 
311:                         // add query parameter to superglobal _GET
312:                         if (isset($aUrlComponents['query'])) {
313:                             $vars = NULL;
314:                             parse_str($aUrlComponents['query'], $vars);
315:                             $_GET = array_merge($_GET, $vars);
316:                         }
317: 
318:                         $this->_aParts = array();
319:                     }
320:                 } else {
321:                     return;
322:                 }
323:             }
324: 
325:             $aPaths = explode('/', $aUrlComponents['path']);
326:             foreach ($aPaths as $p => $item) {
327:                 if (!empty($item)) {
328:                     // pathinfo would also work
329:                     $arr = explode('.', $item);
330:                     $count = count($arr);
331:                     if ($count > 0 && '.' . strtolower($arr[$count - 1]) == parent::getConfig('file_extension')) {
332:                         array_pop($arr);
333:                         $this->_sArtName = trim(implode('.', $arr));
334:                     } else {
335:                         $this->_aParts[] = $item;
336:                     }
337:                 }
338:             }
339: 
340:             if ($secondCall == true) {
341:                 // reprocess extracting client and language
342:                 $this->_setClientId();
343:                 mr_loadConfiguration($this->_iClientMR);
344:                 $this->_setLanguageId();
345:             }
346:         }
347:         ModRewriteDebugger::add($this->_aParts, 'ModRewriteController::_extractRequestUri() $this->_aParts');
348: 
349:         // loop parts array and remove existing 'front_content.php'
350:         if ($this->_hasPartArrayItems()) {
351:             foreach ($this->_aParts as $p => $item) {
352:                 if ($item == self::FRONT_CONTENT) {
353:                     unset($this->_aParts[$p]);
354:                 }
355:             }
356:         }
357:     }
358: 
359:     /**
360:      * Tries to initialize the client id.
361:      * This is required to load the proper plugin configuration for current client.
362:      */
363:     private function _initializeClientId() {
364:         global $client, $changeclient, $load_client;
365: 
366:         $iClient = (isset($client) && (int) $client > 0) ? $client : 0;
367:         $iChangeClient = (isset($changeclient) && (int) $changeclient > 0) ? $changeclient : 0;
368:         $iLoadClient = (isset($load_client) && (int) $load_client > 0) ? $load_client : 0;
369: 
370:         $this->_iClientMR = 0;
371:         if ($iClient > 0 && $iChangeClient == 0) {
372:             $this->_iClientMR = $iClient;
373:         } elseif ($iChangeClient > 0) {
374:             $this->_iClientMR = $iChangeClient;
375:         } else {
376:             $this->_iClientMR = $iLoadClient;
377:         }
378: 
379:         if ((int) $this->_iClientMR > 0) {
380:             // set global client variable
381:             $client = (int) $this->_iClientMR;
382:         }
383:     }
384: 
385:     /**
386:      * Tries to initialize the language id.
387:      */
388:     private function _initializeLanguageId() {
389:         global $lang, $changelang, $load_lang;
390: 
391:         $iLang = (isset($lang) && (int) $lang > 0) ? $lang : 0;
392:         $iChangeLang = (isset($changelang) && (int) $changelang > 0) ? $changelang : 0;
393:         $iLoadLang = (isset($load_lang) && (int) $load_lang > 0) ? $load_lang : 0;
394: 
395:         $this->_iLangMR = 0;
396:         if ($iLang > 0 && $iChangeLang == 0) {
397:             $this->_iLangMR = $iLang;
398:         } elseif ($iChangeLang > 0) {
399:             $this->_iLangMR = $iChangeLang;
400:         } else {
401:             $this->_iLangMR = $iLoadLang;
402:         }
403: 
404:         if ((int) $this->_iLangMR > 0) {
405:             // set global lang variable
406:             $lang = (int) $this->_iLangMR;
407:         }
408:     }
409: 
410:     /**
411:      * Detects client id from given url
412:      */
413:     private function _setClientId() {
414:         global $client;
415: 
416:         if ($this->_bError) {
417:             return;
418:         } elseif ($this->_isRootRequest()) {
419:             // request to root
420:             return;
421:         } elseif (parent::getConfig('use_client') !== 1) {
422:             return;
423:         }
424: 
425:         if (parent::getConfig('use_client_name') == 1) {
426:             $detectedClientId = (int) ModRewrite::getClientId(array_shift($this->_aParts));
427:         } else {
428:             $detectedClientId = (int) array_shift($this->_aParts);
429:             if ($detectedClientId > 0 && !ModRewrite::languageIdExists($detectedClientId)) {
430:                 $detectedClientId = 0;
431:             }
432:         }
433: 
434:         if ($detectedClientId > 0) {
435:             // overwrite existing client variables
436:             $this->_iClientMR = $detectedClientId;
437:             $client = $detectedClientId;
438:         } else {
439:             $this->_setError(self::ERROR_CLIENT);
440:         }
441:     }
442: 
443:     /**
444:      * Sets language id
445:      */
446:     private function _setLanguageId() {
447:         global $lang;
448: 
449:         if ($this->_bError) {
450:             return;
451:         } elseif ($this->_isRootRequest()) {
452:             // request to root
453:             return;
454:         } elseif (parent::getConfig('use_language') !== 1) {
455:             return;
456:         }
457: 
458:         if (parent::getConfig('use_language_name') == 1) {
459:             // thanks to Nicolas Dickinson for multi Client/Language BugFix
460:             $languageName = array_shift($this->_aParts);
461:             $detectedLanguageId = (int) ModRewrite::getLanguageId($languageName, $this->_iClientMR);
462:         } else {
463:             $detectedLanguageId = (int) array_shift($this->_aParts);
464:             if ($detectedLanguageId > 0 && !ModRewrite::clientIdExists($detectedLanguageId)) {
465:                 $detectedLanguageId = 0;
466:             }
467:         }
468: 
469:         if ($detectedLanguageId > 0) {
470:             // overwrite existing language variables
471:             $this->_iLangMR = $detectedLanguageId;
472:             $lang = $detectedLanguageId;
473:         } else {
474:             $this->_setError(self::ERROR_LANGUAGE);
475:         }
476:     }
477: 
478:     /**
479:      * Sets path resolver and category id
480:      */
481:     private function _setPathresolverSetting() {
482:         global $client, $lang, $load_lang, $idcat;
483: 
484:         if ($this->_bError) {
485:             return;
486:         } elseif (!$this->_hasPartArrayItems()) {
487:             return;
488:         }
489: 
490:         $this->_sPath = '/' . implode('/', $this->_aParts) . '/';
491: 
492:         if (!isset($lang) || (int) $lang <= 0) {
493:             if ((int) $load_lang > 0) {
494:                 // load_client is set in __FRONTEND_PATH__/data/config/config.php
495:                 $lang = (int) $load_lang;
496:             } else {
497:                 // get client id from table
498:                 $clCol = new cApiClientLanguageCollection();
499:                 $clCol->setWhere('idclient', $client);
500:                 $clCol->query();
501:                 if (false !== $clItem = $clCol->next()) {
502:                     $lang = $clItem->get('idlang');
503:                 }
504:             }
505:         }
506: 
507:         $idcat = (int) ModRewrite::getCatIdByUrlPath($this->_sPath);
508: 
509:         if ($idcat == 0) {
510:             // category couldn't resolved
511:             $this->_setError(self::ERROR_CATEGORY);
512:             $idcat = NULL;
513:         } else {
514:             // unset $this->_sPath if $idcat could set, otherwhise it would be resolved again.
515:             unset($this->_sPath);
516:         }
517: 
518:         ModRewriteDebugger::add($idcat, 'ModRewriteController->_setPathresolverSetting $idcat');
519:         ModRewriteDebugger::add($this->_sPath, 'ModRewriteController->_setPathresolverSetting $this->_sPath');
520:     }
521: 
522:     /**
523:      * Sets article id
524:      */
525:     private function _setIdart() {
526:         global $idcat, $idart, $lang;
527: 
528:         if ($this->_bError) {
529:             return;
530:         } else if ($this->_isRootRequest()) {
531:             return;
532:         }
533: 
534:         $iIdCat = (isset($idcat) && (int) $idcat > 0) ? $idcat : 0;
535:         $iIdArt = (isset($idart) && (int) $idart > 0) ? $idart : 0;
536:         $detectedIdart = 0;
537:         $defaultStartArtName = parent::getConfig('default_startart_name');
538:         $currArtName = $this->_sArtName;
539: 
540:         // startarticle name in url
541:         if (parent::getConfig('add_startart_name_to_url') && !empty($currArtName)) {
542:             if ($currArtName == $defaultStartArtName) {
543:                 // stored articlename is the default one, remove it ModRewrite::getArtIdByWebsafeName()
544:                 // will find the real article name
545:                 $currArtName = '';
546:             }
547:         }
548: 
549:         // Last check, before detecting article id
550:         if ($iIdCat == 0 && $iIdArt == 0 && empty($currArtName)) {
551:             // no idcat, idart and article name
552:             // must be a request to root or with language name and/or client name part!
553:             return;
554:         }
555: 
556:         if ($iIdCat > 0 && $iIdArt == 0 && !empty($currArtName)) {
557:             // existing idcat with no idart and with article name
558:             $detectedIdart = (int) ModRewrite::getArtIdByWebsafeName($currArtName, $iIdCat, $lang);
559:         } elseif ($iIdCat > 0 && $iIdArt == 0 && empty($currArtName)) {
560:             if (parent::getConfig('add_startart_name_to_url') && ($currArtName == '' || $defaultStartArtName == '' || $defaultStartArtName == $this->_sArtName)) {
561:                 // existing idcat without idart and without article name or with default start article name
562:                 $catLangColl = new cApiCategoryLanguageCollection();
563:                 $detectedIdart = (int) $catLangColl->getStartIdartByIdcatAndIdlang($iIdCat, $lang);
564:             }
565:         } elseif ($iIdCat == 0 && $iIdArt == 0 && !empty($currArtName)) {
566:             // no idcat and idart but article name
567:             $detectedIdart = (int) ModRewrite::getArtIdByWebsafeName($currArtName, $iIdCat, $lang);
568:         }
569: 
570:         if ($detectedIdart > 0) {
571:             $idart = $detectedIdart;
572:         } elseif (!empty($currArtName)) {
573:             $this->_setError(self::ERROR_ARTICLE);
574:         }
575: 
576:         ModRewriteDebugger::add($detectedIdart, 'ModRewriteController->_setIdart $detectedIdart');
577:     }
578: 
579:     /**
580:      * Does post validation of the extracted data.
581:      *
582:      * One main goal of this function is to prevent duplicated content, which could happen, if
583:      * the configuration 'startfromroot' is activated.
584:      */
585:     private function _postValidation() {
586:         global $idcat, $idart, $client;
587: 
588:         if ($this->_bError || $this->_bRoutingFound || !$this->_hasPartArrayItems()) {
589:             return;
590:         }
591: 
592:         if (parent::getConfig('startfromroot') == 1 && parent::getConfig('prevent_duplicated_content') == 1) {
593: 
594:             // prevention of duplicated content if '/firstcat/' is directly requested!
595: 
596:             $idcat = (isset($idcat) && (int) $idcat > 0) ? $idcat : NULL;
597:             $idart = (isset($idart) && (int) $idart > 0) ? $idart : NULL;
598: 
599:             // compose new parameter
600:             $param = '';
601:             if ($idcat) {
602:                 $param .= 'idcat=' . (int) $idcat;
603:             }
604:             if ($idart) {
605:                 $param .= ($param !== '') ? '&idart=' . (int) $idart : 'idart=' . (int) $idart;
606:             }
607: 
608:             if ($param == '') {
609:                 return;
610:             }
611: 
612:             // set client language, if not set before
613:             mr_setClientLanguageId($client);
614: 
615:             //rebuild url
616:             $url = mr_buildNewUrl(self::FRONT_CONTENT . '?' . $param);
617: 
618:             $aUrlComponents = @parse_url($this->_sIncommingUrl);
619:             $incommingUrl = (isset($aUrlComponents['path'])) ? $aUrlComponents['path'] : '';
620: 
621:             ModRewriteDebugger::add($url, 'ModRewriteController->_postValidation validate url');
622:             ModRewriteDebugger::add($incommingUrl, 'ModRewriteController->_postValidation incommingUrl');
623: 
624:             // now the new generated uri should be identical with the request uri
625:             if ($incommingUrl !== $url) {
626:                 $this->_setError(self::ERROR_POST_VALIDATION);
627:                 $idcat = NULL;
628:             }
629:         }
630:     }
631: 
632:     /**
633:      * Parses the url using defined separators
634:      *
635:      * @param   string  $url  Incoming url
636:      * @return  string  Parsed url
637:      */
638:     private function _parseUrl($url) {
639:         $this->_sResolvedUrl = $url;
640: 
641:         $oMrUrlUtil = ModRewriteUrlUtil::getInstance();
642:         $url = $oMrUrlUtil->toContenidoUrl($url);
643: 
644:         return @parse_url($url);
645:     }
646: 
647:     /**
648:      * Returns state of parts property.
649:      *
650:      * @return  bool  True if $this->_aParts propery contains items
651:      */
652:     private function _hasPartArrayItems() {
653:         return (!empty($this->_aParts));
654:     }
655: 
656:     /**
657:      * Checks if current request was a root request.
658:      *
659:      * @return  bool
660:      */
661:     private function _isRootRequest() {
662:         return ($this->_sIncommingUrl == '/' || $this->_sIncommingUrl == '');
663:     }
664: 
665:     /**
666:      * Sets error code and error flag (everything greater than 0 is an error)
667:      * @param  int  $errCode
668:      */
669:     private function _setError($errCode) {
670:         $this->_iError = (int) $errCode;
671:         $this->_bError = ((int) $errCode > 0);
672:     }
673: 
674: }
CMS CONTENIDO 4.9.3 API documentation generated by ApiGen 2.8.0