public function toJsObject()
    {
        $strParams = $this->strParamsArray ? implode(', ', $this->strParamsArray) : '';
        return 'function(' . $strParams . ') {' . $this->strBody . '}';
    }
public function toJsObject()
    {
        $strParams = $this->strParamsArray ? implode(', ', $this->strParamsArray) : '';
        return 'function(' . $strParams . ') {' . $this->strBody . '}';
    }
public function toJsObject ( ) { $ strParams = $ this -> strParamsArray ? implode ( ', ' , $ this -> strParamsArray ) : '' ; return 'function(' . $ strParams . ') {' . $ this -> strBody . '}' ; }
Return a javascript enclosure. Enclosures cannot be included in JSON, so we need to create a custom
encoding to include in the json that will get decoded at the other side.

@return string
Return a javascript enclosure . Enclosures cannot be included in JSON so we need to create a custom encoding to include in the json that will get decoded at the other side .