<?php
class Message {


    public static function DATAALREADYEXIST(){

        $msg = array(
            'code'=> 201,
            'msg' => 'email already exist'
        );
        echo json_encode($msg);

    }


    public static function DATASUCCESSFULLYSAVED(){

        $msg = array(
            'code'=> 200,
            'msg' => 'successfully saved data into db'
        );
        echo json_encode($msg);

    }

    public static function DATASUCCESSFULLYUPDATED(){

        $msg = array(
            'code'=> 200,
            'msg' => 'successfully updated data into db'
        );
        echo json_encode($msg);

    }

    public static function UNAUTHORIZED(){

        $msg = array(
            'code'=> 401,
            'msg' => 'unauthorized'
        );
        echo json_encode($msg);

    }

    public static function INVALIDPARAMTERS(){

        $msg = array(
            'code'=> 400,
            'msg' => "Bad Request: The JSON format is incorrect or the parameters passed are invalid."
        );
        echo json_encode($msg);

    }



    public static function DATASAVEERROR(){

        $msg = array(
            'code'=> 400,
            'msg' => 'Something really went wrong in saving the data into Database'
        );
        echo json_encode($msg);

    }

    public static function ERROR(){

        $msg = array(
            'code'=> 401,
            'msg' => 'error'
        );
        echo json_encode($msg);

    }

    public static function DATAFETCHINGERROR(){

        $msg = array(
            'code'=> 400,
            'msg' => 'Something really went wrong in fetching the data into Database'
        );
        echo json_encode($msg);

    }

    public static function EMAILSENDINGERROR(){

        $msg = array(
            'code'=> 400,
            'msg' => 'Something really went wrong in sending the email'
        );
        echo json_encode($msg);

    }


    public static function INVALIDDETAILS(){

        $msg = array(
            'code'=> 201,
            'msg' => 'Incorrect login details'
        );
        echo json_encode($msg);

    }

    public static function DUPLICATEDATE(){

        $msg = array(
            'code'=> 201,
            'msg' => 'Data Already exist'
        );
        echo json_encode($msg);

    }

    public static function NOCHANGES(){

        $msg = array(
            'code'=> 201,
            'msg' => 'NO Changes in the data'
        );
        echo json_encode($msg);

    }

    public static function INCORRECTPASSWORD(){

        $msg = array(
            'code'=> 201,
            'msg' => 'Incorrect old password'
        );
        echo json_encode($msg);

    }

    public static function EmptyDATA(){

        $msg = array(
            'code'=> 201,
            'msg' => 'EMPTY: NO RECORD IN THE DATABASE'
        );
        echo json_encode($msg);

    }

    public static function DONOTEXIST($object){

        $msg = array(
            'code'=> 404,
            'msg' => "Not Found: The requested resource($object) does not exist."
        );
        echo json_encode($msg);

    }

    public static function METHODNOTALLOWED(){

        $msg = array(
            'code'=> 405,
            'msg' => "The requested method is not supported for this endpoint. Please use a POST request."
        );
        echo json_encode($msg);
    }

    public static function STRIPIDEMPTY(){

        $msg = array(
            'code'=> 202,
            'msg' => 'payment is not added by student'
        );
        echo json_encode($msg);

    }

    public static function DELETEDSUCCESSFULLY()
    {

        $msg = array(
            'code' => 200,
            'msg' => 'Deleted Successfully'
        );
        echo json_encode($msg);

    }

    public static function ALREADYDELETED()
    {

        $msg = array(
            'code' => 201,
            'msg' => 'Already deleted'
        );
        echo json_encode($msg);

    }

    public static function ACCESSRESTRICTED(){

        $msg = array(
            'code'=> 202,
            'msg' => 'Access Restricted'
        );
        echo json_encode($msg);

    }

    public static function EDITRESTRICTED(){

        $msg = array(
            'code'=> 202,
            'msg' => 'You cannot edit this. Please contact the administrator'
        );
        echo json_encode($msg);

    }

    public static function DELETERESTRICTED(){

        $msg = array(
            'code'=> 202,
            'msg' => 'You cannot delete this.Please contact the administrator'
        );
        echo json_encode($msg);

    }



}
?>