public function response($successMessage, $status)
    {
        $count = 0;
        $errors = 0;

        foreach ($status as $k => $v) {
            switch ($k) {
                case 'error':
                    $errors += count($v);
                    break;
                case 'success':
                    $count += count($v);
                    break;
            }
        }

        $response = Controller::curr()->getResponse();

        if ($response) {
            $response->setStatusCode(
                200,
                sprintf($successMessage, $count, $errors)
            );
        }

        return json_encode($status);
    }