setRes(LuStringUtils::convertJsonString($dam->_res)); return $dbo; } /** * @param $_text string * @param $_query string * @return \App\Http\DataAccess\SP\SpSearch; */ public static function execute($_text, $_query) { $values = DB::select('SELECT to_json(data._res) AS _res FROM sp_search(:_text, :_query) data', array(":_text" => $_text, ":_query" => $_query)); return self::damToDbo($values[0]); } public function jsonSerialize() { return array( "Res" => $this->_Res ); } public static function jsonDeserialize($json) { $dbo = new SpSearch(); if (isset($json["Res"])) { $dbo->setRes($json["Res"]); } return $dbo; } public static function generateSample() { $dbo = new SpSearch(); $dbo->setRes(true); return $dbo; } /** * @var boolean */ protected $_Res; public function getRes() { return $this->_Res; } public function setRes($value) { $this->_Res = $value; } }