Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UploadCLASS
- //HÄMTA USER I EN ICKE-INSTANS SÅ JA FÅR REDA PÅ ROLE genom getRole()????
- \Model\User $user ...??
- if($comViw->WantComment())
- {
- $newsID = $fileViw->GetSelectedID();
- $body .= $fileViw->doOutputArticles($fileHandlr->GetAllNews(), $fileHandlr->GetAllPictures(), $newsID, $Role);
- $body .= $comContrl->doControll($db, $newsID);
- }
- else
- {
- $body .= $fileViw->doOutputArticles($fileHandlr->GetAllNews(), $fileHandlr->GetAllPictures(), $newsID = NULL, $Role);
- }
- return $fileViw->doOutput($body, $message);
- -------------------------------------------
- User CLASS
- <?php
- namespace Model;
- class UserArray
- {
- private $_Users = array();
- public function __construct() {
- }
- public function add(User $Users)
- {
- $this->_Users[] = $Users;
- }
- public function get()
- {
- return $this->_Users;
- }
- }
- class User
- {
- private $_UserID; //Integer
- private $_Username; //String
- private $_Password; //String
- private $_Role; //String
- public function __construct($UserID, $Username, $Password, $Role)
- {
- $this->_UserID = $UserID;
- $this->_Username = $Username;
- $this->_Password = $Password;
- $this->_Role = $Role;
- }
- public function getUserID()
- {
- return $this->_UserID;
- }
- public function getUsername()
- {
- return $this->_Username;
- }
- public function getPassword()
- {
- return $this->_Password;
- }
- public function getRole()
- {
- return $this->_Role;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement