Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / includes / libs / replacers / Replacer.php
index 924fb30..655e771 100644 (file)
  * Base class for "replacers", objects used in preg_replace_callback() and
  * StringUtils::delimiterReplaceCallback()
  */
-class Replacer {
+abstract class Replacer {
        /**
         * @return array
         */
        public function cb() {
-               return array( &$this, 'replace' );
+               return [ $this, 'replace' ];
        }
+
+       /**
+        * @param array $matches
+        * @return string
+        */
+       abstract public function replace( array $matches );
 }