*/ /** * patTemplate modfifier session * * Copy session variables to template placeholder * * Possible attributes are: * - session - name of variable in session * */ class patTemplate_Modifier_Session extends patTemplate_Modifier { private $defaults = array( 'session' => '' ); /** * Modify the value * * @param string value * @return string modified value */ public function modify($value, $params = array()) { $params = array_merge($this->defaults, $params); $sess = WBClass::create('patSession'); $tmp = $sess->get($params['session']); if (empty($tmp)) { return $value; } $value = $tmp; return $value; } }