Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class User
- {
- private $firstname;
- private $username;
- private $password;
- private $admin;
- private $msg;
- function __construct($firstname ,$username, $password, $admin) {
- /*
- יוצר משתמש על פי מספר פרמטרים .
- */
- if(empty($firstname) || empty($username) || empty($password) || empty($admin)) {
- throw new Exception("One of the required parameters you sent are empty");
- }
- else {
- $this->firstname = $firstname;
- $this->username = $username;
- $this->password = $password;
- $this->admin = $admin;
- $this->msg = 0;
- }
- }
- function getUser()
- {
- return $this->username;
- }
- function getMsg()
- {
- return $this->msg;
- }
- function getPassword()
- {
- return $this->password;
- }
- function getName()
- {
- return $this->firstname;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement