const CACHE_VERSION = 1;
+ /**
+ * @var array Brace matching rules.
+ */
+ protected $rules = [
+ '{' => [
+ 'end' => '}',
+ 'names' => [
+ 2 => 'template',
+ 3 => 'tplarg',
+ ],
+ 'min' => 2,
+ 'max' => 3,
+ ],
+ '[' => [
+ 'end' => ']',
+ 'names' => [ 2 => null ],
+ 'min' => 2,
+ 'max' => 2,
+ ]
+ ];
+
/**
* Store a document tree in the cache.
*
}
$key = wfMemcKey(
- // TODO: Once we require PHP 5.5, use static::class instead of
- // get_called_class() or get_class( $this ).
- defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : get_called_class(),
+ defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
md5( $text ), $flags );
$value = sprintf( "%08d", static::CACHE_VERSION ) . $tree;
$cache = ObjectCache::getInstance( $config->get( 'MainCacheType' ) );
$key = wfMemcKey(
- // TODO: Once we require PHP 5.5, use static::class instead of
- // get_called_class() or get_class( $this ).
- defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : get_called_class(),
+ defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
md5( $text ), $flags );
$value = $cache->get( $key );