function __call($method, $params) { if ($method === __CLASS__) { return; } $quotes = array(); if ($params) { foreach ((array) $params as $param) { if ($param[0] == '@') { $quotes[] = substr($param, 1); } else { $quotes[] = JS::quote($param); } } } $this->js_str .= ($this->js_str ? '.' : '') . $method . '(' . implode(',', $quotes) . ')'; return $this; }