/** * Replaces the matched tags. * * @param array An array of matches (see preg_match_all) * @return string */ protected function _replace(&$matches) { static $rwEngine; include_once JPATH_ROOT . "/components/com_acctexp/acctexp.class.php"; if (empty($rwEngine->rewrite)) { $user = JFactory::getUser(); $rwEngine = new reWriteEngine(); $metaUser = new metaUser($user->id); $request = new stdClass(); $request->metaUser = $metaUser; $rwEngine->resolveRequest($request); } return $rwEngine->resolve($matches[1]); }
public function CustomRestrictionResponse($restrictions) { $s = array(); $n = 0; if (is_array($restrictions) && !empty($restrictions)) { foreach ($restrictions as $restriction) { $check1 = AECToolbox::rewriteEngine($restriction[0], $this); $check2 = AECToolbox::rewriteEngine($restriction[2], $this); $eval = $restriction[1]; if ($check1 === $restriction[0] && reWriteEngine::isRWEstring($restriction[0])) { $check1 = null; } if ($check2 === $restriction[2] && reWriteEngine::isRWEstring($restriction[2])) { $check2 = null; } $s['customchecker' . $n] = AECToolbox::compare($eval, $check1, $check2); $n++; } } return $s; }
/** * @param string $content */ static function rewriteEngineExplain($content) { $rwEngine = new reWriteEngine(); return $rwEngine->explain($content); }