public function to_array($arr) { if (is_array($arr)) { return $arr; } $arr = array($arr); return $arr; }