public function getContext() { if ($this->obj) { $ctx = grn_obj_ctx($this->obj); } else { $ctx = grn_get_default_ctx(); } return new Context($ctx); }
public static function getDefaultContext() { return new Context(grn_get_default_ctx()); }