<?php
include( $_SERVER['DOCUMENT_ROOT'] . '/db/datahandler.php' );

class UserLogic
{
    private $dh;
    function __construct()
    {
        $this->dh = new DataHandler();
    }

    function handleUserRequests($method, $data)
    {
        switch ($method) {
            case 'register':
                return $this->dh->registerUser($data);
                break;
                /*
            case 'login':
                return $this->loginUser($data);
                break;
            case 'logout':
                return $this->logoutUser($data);
                break;
            case 'getUser':
                return $this->getUser($data);
                break;
            case 'getUsers':
                return $this->getUsers($data);
                break;
            case 'updateUser':
                return $this->updateUser($data);
                break;
            case 'deleteUser':
                return $this->deleteUser($data);
                break;
                */
            default:
                return false;
                break;
        }
    }
}

?>