Collections\Controller\Api::emptytable PHP Method

emptytable() public method

public emptytable ( )
    public function emptytable()
    {
        $collection = $this->param("collection", null);
        if ($collection) {
            $collection = "collection" . $collection["_id"];
            $this->app->db->remove("collections/{$collection}", []);
        }
        return $collection ? '{"success":true}' : '{"success":false}';
    }