Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezurlaliasfilter.php
Go to the documentation of this file.
1 <?php
21 abstract class eZURLAliasFilter
22 {
23 /*
24 *
25 * Process the url alias element $text and return the new element as a string.
26 * This method must be overriden in custom URL alias filters.
27 *
28 * This function has not been declared as "abstract" because of backward compatibility
29 * but you should see it as an abstract method.
30 *
31 * @abstract
32 * @param string $text The URL alias
33 * @param string $languageObject The current language object used for the string $text.
34 * @param object $caller The object which called the filtering process, can be null.
35 * @return string the processed URL alias
36 */
37 public function process( $text, &$languageObject, &$caller )
38 {
39 return $text;
40 }
41
59 public static function processFilters( $text, $languageObject, $caller )
60 {
61 $ini = eZINI::instance( 'site.ini' );
62 $filterClassList = $ini->variable( 'URLTranslator', 'FilterClasses' );
63
64 foreach ( $filterClassList as $filterClass )
65 {
66 if( !class_exists( $filterClass ) )
67 {
68 eZDebug::writeError( $filterClass . ' does not exist, please run bin/php/ezpgenerateautoload.php', __METHOD__ );
69 continue;
70 }
71
72 $filter = new $filterClass();
73 $text = $filter->process( $text, $languageObject, $caller );
74 }
75
76 return $text;
77 }
78 }
79
80 ?>
eZDebug\writeError
static writeError( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:545
eZURLAliasFilter
Definition: ezurlaliasfilter.php:22
eZURLAliasFilter\processFilters
static processFilters( $text, $languageObject, $caller)
Definition: ezurlaliasfilter.php:59
eZURLAliasFilter\process
process( $text, &$languageObject, &$caller)
Definition: ezurlaliasfilter.php:37
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.