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

  • cCodeGeneratorAbstract
  • cCodeGeneratorFactory
  • cCodeGeneratorStandard
  • cContentTypeAbstract
  • cContentTypeAbstractTabbed
  • cContentTypeDate
  • cContentTypeFilelist
  • cContentTypeHead
  • cContentTypeHtml
  • cContentTypeHtmlhead
  • cContentTypeImg
  • cContentTypeImgdescr
  • cContentTypeImgeditor
  • cContentTypeLink
  • cContentTypeLinkdescr
  • cContentTypeLinkeditor
  • cContentTypeLinktarget
  • cContentTypeTeaser
  • cContentTypeText
  • cTypeGenerator
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: 
  3: /**
  4:  * CONTENIDO standard code generator
  5:  *
  6:  * @package Core
  7:  * @subpackage ContentType
  8:  * @version SVN Revision $Rev:$
  9:  *
 10:  * @author Murat Purc <murat@purc.de>
 11:  * @copyright four for business AG <www.4fb.de>
 12:  * @license http://www.contenido.org/license/LIZENZ.txt
 13:  * @link http://www.4fb.de
 14:  * @link http://www.contenido.org
 15:  */
 16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 17: 
 18: /**
 19:  * CONTENIDO standard code generator.
 20:  *
 21:  * @package Core
 22:  * @subpackage ContentType
 23:  */
 24: class cCodeGeneratorStandard extends cCodeGeneratorAbstract {
 25: 
 26:     /**
 27:      * {@inheritdoc}
 28:      */
 29:     public function _generate($contype = true) {
 30:         global $cfg, $code;
 31: 
 32:         $this->_cssData = '';
 33:         $this->_jsData = '';
 34:         $this->_tplName = '';
 35: 
 36:         cDebug::out("conGenerateCode($this->_idcat, $this->_idart, $this->_lang, $this->_client, $this->_layout);<br>");
 37: 
 38:         // Set category article id
 39:         $idcatart = conGetCategoryArticleId($this->_idcat, $this->_idart);
 40: 
 41:         // Set configuration for article
 42:         $this->_idtplcfg = $this->_getTemplateConfigurationId();
 43:         if (NULL === $this->_idtplcfg) {
 44:             $this->_processNoConfigurationError($idcatart);
 45:             return '0601';
 46:         }
 47: 
 48:         // List of configured container
 49:         $containerConfigurations = conGetContainerConfiguration($this->_idtplcfg);
 50: 
 51:         // Set idlay and idmod array
 52:         $data = $this->_getTemplateData();
 53:         $idlay = $data['idlay'];
 54:         $idtpl = $data['idtpl'];
 55:         $this->_tplName = cApiStrCleanURLCharacters($data['name']);
 56: 
 57:         // List of used modules
 58:         $containerModules = conGetUsedModules($idtpl);
 59: 
 60:         // Load layout code from file
 61:         $layoutInFile = new cLayoutHandler($idlay, '', $cfg, $this->_lang);
 62:         $this->_layoutCode = $layoutInFile->getLayoutCode();
 63:         $this->_layoutCode = cApiStrNormalizeLineEndings($this->_layoutCode, "\n");
 64: 
 65:         $moduleHandler = new cModuleHandler();
 66: 
 67:         // Create code for all containers
 68:         if ($idlay) {
 69:             cInclude('includes', 'functions.tpl.php');
 70:             $containerNumbers = tplGetContainerNumbersInLayout($idlay);
 71: 
 72:             foreach ($containerNumbers as $containerNr) {
 73:                 if (!isset($containerModules[$containerNr]) || !is_numeric($containerModules[$containerNr])) {
 74:                     // No configured module in this container
 75:                     // reset current module state and process empty container
 76:                     $this->_resetModule();
 77:                     $this->_processCmsContainer($containerNr);
 78:                     continue;
 79:                 }
 80: 
 81:                 $containerModuleId = $containerModules[$containerNr];
 82:                 $oModule = new cApiModule($containerModuleId);
 83:                 $module = $oModule->toArray();
 84:                 if (false === $module) {
 85:                     $module = array();
 86:                 }
 87: 
 88:                 $this->_resetModule();
 89: 
 90:                 $this->_modulePrefix[] = '$cCurrentModule = ' . $containerModuleId . ';';
 91:                 $this->_modulePrefix[] = '$cCurrentContainer = ' . $containerNr . ';';
 92: 
 93:                 $moduleHandler = new cModuleHandler($containerModuleId);
 94:                 $input = '';
 95: 
 96:                 // Get the contents of input and output from files and not from
 97:                 // db-table
 98:                 if ($moduleHandler->modulePathExists() == true) {
 99:                     $this->_moduleCode = $moduleHandler->readOutput();
100:                     // Load css and js content of the js/css files
101:                     if ($moduleHandler->getFilesContent('css', 'css') !== false) {
102:                         $this->_cssData .= $moduleHandler->getFilesContent('css', 'css');
103:                     }
104: 
105:                     if ($moduleHandler->getFilesContent('js', 'js') !== false) {
106:                         $this->_jsData .= $moduleHandler->getFilesContent('js', 'js');
107:                     }
108: 
109:                     $input = $moduleHandler->readInput();
110:                 }
111: 
112:                 $this->_moduleCode = $this->_moduleCode . "\n";
113: 
114:                 // Process CMS value tags
115:                 $containerCmsValues = $this->_processCmsValueTags($containerNr, $containerConfigurations[$containerNr]);
116: 
117:                 // Add CMS value code to module prefix code
118:                 if ($containerCmsValues) {
119:                     $this->_modulePrefix[] = $containerCmsValues;
120:                 }
121: 
122:                 // Process frontend debug
123:                 $this->_processFrontendDebug($containerNr, $module);
124: 
125:                 // Replace new containers
126:                 $this->_processCmsContainer($containerNr);
127:             }
128:         }
129: 
130:         // Find out what kind of CMS_... Vars are in use
131:         $a_content = $this->_getUsedCmsTypesData();
132: 
133:         // Replace all CMS_TAGS[]
134:         if ($contype) {
135:             $this->_processCmsTags($a_content, true);
136:         }
137: 
138:         // Add/replace title tag
139:         $this->_processCodeTitleTag();
140: 
141:         // Add/replace meta tags
142:         $this->_processCodeMetaTags();
143: 
144:         // Save the collected css/js data and save it under the template name
145:         // ([templatename].css , [templatename].js in cache dir
146:         $cssFile = '';
147:         if (strlen($this->_cssData) > 0) {
148:             if (($myFileCss = $moduleHandler->saveContentToFile($this->_tplName, 'css', $this->_cssData)) !== false) {
149:                 $oHTML = new cHTML(array(
150:                     'rel' => 'stylesheet',
151:                     'type' => 'text/css',
152:                     'href' => $myFileCss
153:                 ));
154:                 $oHTML->setTag('link');
155:                 $cssFile = $oHTML->render();
156:             }
157:         }
158: 
159:         $jsFile = '';
160:         if (strlen($this->_jsData) > 0) {
161:             if (($myFileJs = $moduleHandler->saveContentToFile($this->_tplName, 'js', $this->_jsData)) !== false) {
162:                 $jsFile = '<script src="' . $myFileJs . '" type="text/javascript"></script>';
163:             }
164:         }
165: 
166:         // // show toolbar with revisions of article This toolbar is only shown
167:         // in
168:         // // backend in edit mode if revision control is enabled
169:         // $revionsToolBar = $this->_revisionControl->getToolbar();
170:         // if (NULL !== $revionsToolBar) {
171:         // if (false !== strpos($this->_layoutCode, '<body>')) {
172:         // $this->_layoutCode = str_ireplace_once('<body>', '<body>' .
173:         // $revionsToolBar, $this->_layoutCode);
174:         // } else {
175:         // // TODO wo füg ich die dann ein?
176:         // // $this->_layoutCode .= $revionsToolBar;
177:         // }
178:         // }
179: 
180:         // add module CSS at {CSS} position, after title or after opening head
181:         // tag
182:         if (strpos($this->_layoutCode, '{CSS}') !== false) {
183:             $this->_layoutCode = cString::iReplaceOnce('{CSS}', $cssFile, $this->_layoutCode);
184:         } else if (!empty($cssFile)) {
185:             if (strpos($this->_layoutCode, '</title>') !== false) {
186:                 $matches = array();
187:                 preg_match_all("#(<head>.*?</title>)(.*?</head>)#si", $this->_layoutCode, $matches);
188:                 $this->_layoutCode = cString::iReplaceOnce($matches[1][0], $matches[1][0] . $cssFile . $matches[1][1], $this->_layoutCode);
189:             } else {
190:                 $this->_layoutCode = cString::iReplaceOnce('<head>', '<head>' . $cssFile, $this->_layoutCode);
191:             }
192:         }
193: 
194:         // add module JS at {JS} position or before closing body tag if there is
195:         // no {JS}
196:         if (strpos($this->_layoutCode, '{JS}') !== false) {
197:             $this->_layoutCode = cString::iReplaceOnce('{JS}', $jsFile, $this->_layoutCode);
198:         } else if (!empty($jsFile)) {
199:             $this->_layoutCode = cString::iReplaceOnce('</body>', $jsFile . '</body>', $this->_layoutCode);
200:         }
201: 
202:         if ($this->_feDebugOptions['general_information']) {
203:             $debugPrefix = '';
204: 
205:             $debugPrefix .= "<?php\nif (\$frontend_debug['general_information']) {\n";
206:             $debugPrefix .= "\techo(\"<!-- \\n\\n\");\n";
207: 
208:             $layout = new cApiLayout($idlay);
209:             $layouName = $layout->get('name');
210:             $debugPrefix .= "\techo(\"Layout: " . $layouName . " (" . $idlay . ")\\n\");\n";
211: 
212:             $debugPrefix .= "\techo(\"Template: " . $this->_tplName . " (" . $idtpl . ")\\n\");\n";
213: 
214:             $article = new cApiArticleLanguage($this->_idartlang);
215:             $catart = new cApiCategoryArticle();
216:             $cat = new cApiCategoryLanguage();
217:             $cat->loadByCategoryIdAndLanguageId($this->_idcat, $article->get('idlang'));
218:             $catart->loadByMany(array(
219:                 'idcat' => $cat->get('idcat'),
220:                 'idart' => $article->get('idart')
221:             ));
222:             $lang = new cApiLanguage($article->get('idlang'));
223:             $debugPrefix .= "\techo(\"Language: " . $lang->get('idlang') . " (" . $lang->get('name') . ")\\n\");\n";
224: 
225:             $debugPrefix .= "\techo(\"Category: " . $cat->get('idcat') . " (" . $cat->get('name') . ")\\n\");\n";
226: 
227:             $articleName = $article->get('title');
228:             $debugPrefix .= "\techo(\"Article: " . $articleName . " (catart = " . $catart->get('idcatart') . ", artlang = " . $this->_idartlang . ", art = " . $article->get('idart') . ")\\n\");\n";
229: 
230:             $debugPrefix .= "\techo(\"\\n--> \\n\");\n";
231:             $debugPrefix .= "}\n?>";
232: 
233:             $this->_layoutCode = $debugPrefix . $this->_layoutCode;
234:         }
235: 
236:         // Save the generated code
237:         $this->_saveGeneratedCode($idcatart);
238: 
239:         return $this->_layoutCode;
240:     }
241: 
242:     /**
243:      * Will be invoked, if code generation wasn't able to find a configured
244:      * article
245:      * or category.
246:      *
247:      * Creates a error message and writes this into the code cache.
248:      *
249:      * @param int $idcatart Category article id
250:      */
251:     protected function _processNoConfigurationError($idcatart) {
252:         cDebug::out('Neither CAT or ART are configured!<br><br>');
253: 
254:         $code = '<html><body>No code was created for this article in this category.</body><html>';
255:         $this->_saveGeneratedCode($idcatart, $code, false);
256:     }
257: 
258:     /**
259:      * Processes and adds or replaces title tag for an article.
260:      * Calls also the CEC 'Contenido.Content.CreateTitletag' for user defined
261:      * title creation.
262:      *
263:      * @see cCodeGeneratorAbstract::_processCodeTitleTag()
264:      * @return string
265:      */
266:     protected function _processCodeTitleTag() {
267:         if ($this->_pageTitle == '') {
268:             cApiCecHook::setDefaultReturnValue($this->_pageTitle);
269:             $this->_pageTitle = cApiCecHook::executeAndReturn('Contenido.Content.CreateTitletag');
270:         }
271: 
272:         // Add or replace title
273:         if ($this->_pageTitle != '') {
274:             $replaceTag = '{__TITLE__' . md5(rand().time()) . '}';
275:             $this->_layoutCode = preg_replace('/<title>.*?<\/title>/is', $replaceTag, $this->_layoutCode, 1);
276:             if (strstr($this->_layoutCode, $replaceTag)) {
277:                 $this->_layoutCode = str_ireplace($replaceTag, '<title>' . $this->_pageTitle . '</title>', $this->_layoutCode);
278:             } else {
279:                 $this->_layoutCode = cString::iReplaceOnce('</head>', '<title>' . $this->_pageTitle . "</title>\n</head>", $this->_layoutCode);
280:             }
281:         } else {
282:             $this->_layoutCode = str_replace('<title></title>', '', $this->_layoutCode);
283:         }
284: 
285:         return $this->_layoutCode;
286:     }
287: 
288:     /**
289:      * Processes and adds or replaces all meta tags for an article.
290:      *
291:      * Calls also the CEC 'Contenido.Content.CreateMetatags' for user defined
292:      * meta tags creation.
293:      *
294:      * @global array $encoding
295:      */
296:     protected function _processCodeMetaTags() {
297:         global $encoding;
298: 
299:         // get basic meta tags (from article & system)
300:         $metaTags = $this->_getBasicMetaTags();
301: 
302:         // process chain Contenido.Content.CreateMetatags to update meta tags
303:         $_cecIterator = cRegistry::getCecRegistry()->getIterator('Contenido.Content.CreateMetatags');
304:         if ($_cecIterator->count() > 0) {
305:             while (false !== $chainEntry = $_cecIterator->next()) {
306:                 $metaTags = $chainEntry->execute($metaTags);
307:             }
308:         }
309: 
310:         $sMetatags = '';
311: 
312:         foreach ($metaTags as $value) {
313: 
314:             // get meta tag keys
315:             $valueKeys = array_keys($value);
316:             $nameKey = 'name';
317:             foreach ($valueKeys as $key) {
318: 
319:                 if ($key != 'content')
320:                     $nameKey = $key;
321:             }
322: 
323:             // decode entities and htmlspecialchars, content will be converted
324:             // later using conHtmlSpecialChars() by render() function
325:             if (isset($value['content'])) {
326:                 $value['content'] = str_replace('"', '\"', (conHtmlEntityDecode(stripslashes($value['content']))));
327:             }
328: 
329:             // build up metatag string
330:             $oMetaTagGen = new cHTML();
331:             $oMetaTagGen->setTag('meta');
332:             $oMetaTagGen->updateAttributes($value);
333: 
334:             // HTML does not allow ID for meta tags
335:             $oMetaTagGen->removeAttribute('id');
336: 
337:             // check if metatag already exists
338:             $sPattern = '/(<meta(?:\s+)' . $nameKey . '(?:\s*)=(?:\s*)(?:\\"|\\\')(?:\s*)' . $value[$nameKey] . '(?:\s*)(?:\\"|\\\')(?:[^>]+)>\n?)/i';
339:             if (preg_match($sPattern, $this->_layoutCode, $aMatch)) {
340:                 // the meta tag is already specified in the layout
341:                 // replace it only if its attributes are not empty
342:                 $replace = true;
343:                 foreach ($value as $test) {
344:                     if ($test == '') {
345:                         $replace = false;
346:                         break;
347:                     }
348:                 }
349:                 if ($replace) {
350:                     $this->_layoutCode = str_replace($aMatch[1], $oMetaTagGen->render() . "\n", $this->_layoutCode);
351:                 }
352:             } else {
353:                 $sMetatags .= $oMetaTagGen->render() . "\n";
354:             }
355:         }
356: 
357:         // add meta tags
358:         $this->_layoutCode = cString::iReplaceOnce('</head>', $sMetatags . '</head>', $this->_layoutCode);
359:     }
360: 
361:     /**
362:      * Saves the generated code (if layout flag is false and save flag is true)
363:      *
364:      * @global array $cfgClient
365:      * @param int $idcatart Category article id
366:      * @param string $code parameter for setting code manually instead of using
367:      *        the generated layout code
368:      * @param bool $flagCreateCode whether the create code flag in cat_art
369:      *        should be set or not (optional)
370:      */
371:     protected function _saveGeneratedCode($idcatart, $code = '', $flagCreateCode = true) {
372:         global $cfgClient;
373: 
374:         // Write code in the cache of the client. If the folder does not exist
375:         // create one.
376:         if ($this->_layout == false && $this->_save == true) {
377:             if (!is_dir($cfgClient[$this->_client]['code']['path'])) {
378:                 mkdir($cfgClient[$this->_client]['code']['path']);
379:                 @chmod($cfgClient[$this->_client]['code']['path'], 0777);
380:                 cFileHandler::write($cfgClient[$this->_client]['code']['path'] . '.htaccess', "Order Deny,Allow\nDeny from all\n");
381:             }
382: 
383:             $fileCode = ($code == '')? $this->_layoutCode : $code;
384: 
385:             $code = "<?php\ndefined('CON_FRAMEWORK') or die('Illegal call');\n\n?>\n" . $fileCode;
386:             cFileHandler::write($cfgClient[$this->_client]['code']['path'] . $this->_client . '.' . $this->_lang . '.' . $idcatart . '.php', $code, false);
387: 
388:             // Update create code flag
389:             if ($flagCreateCode == true) {
390:                 $oCatArtColl = new cApiCategoryArticleCollection();
391:                 $oCatArtColl->setCreateCodeFlag($idcatart, 0);
392:             }
393:         }
394:     }
395: 
396:     /**
397:      * Collects and return basic meta tags/elements.
398:      *
399:      * @global array $encoding
400:      * @return array List of assozative meta tag values
401:      */
402:     protected function _getBasicMetaTags() {
403: 
404:         // collect all available meta tag entries with non empty values
405:         $metaTags = array();
406:         foreach (conGetAvailableMetaTagTypes() as $key => $value) {
407:             $metaValue = conGetMetaValue($this->_idartlang, $key);
408:             if (0 < strlen($metaValue)) {
409:                 $metaTags[] = array(
410:                     $value['fieldname'] => $value['metatype'],
411:                     'content' => $metaValue
412:                 );
413:             }
414:         }
415: 
416:         // add generator meta tag
417:         // if the version is appended should be configurable due to security
418:         // reasons
419:         $generator = 'CMS CONTENIDO';
420:         $addVersion = true;
421:         if ($addVersion) {
422:             $cfg = cRegistry::getConfig();
423:             $aVersion = explode('.', CON_VERSION);
424:             $generator .= ' ' . $aVersion[0] . '.' . $aVersion[1];
425:         }
426:         $metaTags[] = array(
427:             'name' => 'generator',
428:             'content' => $generator
429:         );
430: 
431:         // add charset or content type meta tag
432:         global $encoding;
433:         if (getEffectiveSetting('generator', 'html5', 'false') == 'true') {
434:             $metaTags[] = array(
435:                 'charset' => $encoding[$this->_lang]
436:             );
437:         } elseif (getEffectiveSetting('generator', 'xhtml', 'false') == 'true') {
438:             $metaTags[] = array(
439:                 'http-equiv' => 'Content-Type',
440:                 'content' => 'application/xhtml+xml; charset=' . $encoding[$this->_lang]
441:             );
442:         } else {
443:             $metaTags[] = array(
444:                 'http-equiv' => 'Content-Type',
445:                 'content' => 'text/html; charset=' . $encoding[$this->_lang]
446:             );
447:         }
448: 
449:         // update (!) index setting of robots meta tag
450:         // the follow value will not be changed
451:         // $index = (bool) $this->getArtLangObject()->get('searchable');
452:         // $metaTags = $this->_updateMetaRobots($metaTags, $index, NULL);
453: 
454:         return $metaTags;
455:     }
456: 
457:     /**
458:      * This method allows to set new values for the robots meta element.
459:      *
460:      * If NULL is given for $index or $follow, existing settings are *not*
461:      * overwritten. If article should be indexed and followed, 'all' will be
462:      * set.
463:      *
464:      * @param array $metaTags array of meta elements to amend
465:      * @param bool|NULL $index if article should be indexed
466:      * @param bool|NULL $follow if links in article should be followed
467:      * @return array
468:      */
469:     protected function _updateMetaRobots(array $metaTags, $index, $follow) {
470: 
471:         // extract robots setting from current meta elements
472:         list($metaTags, $metaRobots) = $this->_extractMetaElement($metaTags, 'name', 'robots');
473: 
474:         if (is_null($metaRobots)) {
475:             // build new meta element if none could be found
476:             $metaRobots = array(
477:                 'name' => 'robots',
478:                 'content' => ''
479:             );
480:         } else {
481:             $content = array_map('trim', explode(',', $metaRobots['content']));
482:             // determine index from extracted element if given value is NULL
483:             if (is_null($index)) {
484:                 $index = (bool) (in_array('all', $content) || in_array('index', $content));
485:                 if (in_array('index', $content) || in_array('all', $content)) {
486:                     $index = true;
487:                 } else if (in_array('noindex', $content)) {
488:                     $index = true;
489:                 } else {
490:                     $index = NULL;
491:                 }
492:             }
493:             // determine follow from extracted element if given value is NULL
494:             if (is_null($follow)) {
495:                 if (in_array('follow', $content) || in_array('all', $content)) {
496:                     $follow = true;
497:                 } else if (in_array('nofollow', $content)) {
498:                     $follow = true;
499:                 } else {
500:                     $follow = NULL;
501:                 }
502:             }
503:         }
504: 
505:         // build and set new content for robots element
506:         $content = array();
507:         if (true === $index && true === $follow) {
508:             $content[] = 'all';
509:         } else {
510:             if (!is_null($index)) {
511:                 $content[] = $index? 'index' : 'noindex';
512:             }
513:             if (!is_null($follow)) {
514:                 $content[] = $follow? 'follow' : 'nofollow';
515:             }
516:         }
517:         $metaRobots['content'] = implode(',', $content);
518: 
519:         // add robots meta element
520:         $metaTags[] = $metaRobots;
521: 
522:         // what do you expect?
523:         return $metaTags;
524:     }
525: 
526:     /**
527:      * Extracts a meta element of type $type (either 'name' or 'http-equiv') and
528:      * name or HTTP header equivalent $nameOrEquiv from the given array of meta
529:      * elements.
530:      *
531:      * Both, the reduced array of meta elements and the meta element to be
532:      * extracted are returned as an array. If the meta element to be extracted
533:      * could not be found, NULL will be returned in its place.
534:      *
535:      * @param array $metaTags
536:      * @param string $type either 'name' or 'http-equiv'
537:      * @param string $nameOrEquiv
538:      * @return array
539:      */
540:     protected function _extractMetaElement(array $metaTags, $type, $nameOrEquiv) {
541: 
542:         // prepare result structure
543:         $result = array(
544:             array(),
545:             NULL
546:         );
547: 
548:         // loop all given meta elements
549:         foreach ($metaTags as $metaTag) {
550:             if (!is_array($metaTag)) {
551:                 // skip $metaTag if it's no array
552:                 continue;
553:             } else if (!array_key_exists($type, $metaTag)) {
554:                 // add element to reduced array if it's of different type
555:                 array_push($result[0], $metaTag);
556:             } else if ($metaTag[$type] !== $nameOrEquiv) {
557:                 // add element to reduced array if it has different name
558:                 array_push($result[0], $metaTag);
559:             } else {
560:                 // set element as extracted element
561:                 $result[1] = $metaTag;
562:             }
563:         }
564: 
565:         // what do you expect?
566:         return $result;
567:     }
568: 
569: }
570: 
CMS CONTENIDO 4.9.4 API documentation generated by ApiGen 2.8.0