PHP Classes

File: tests/unit/User/UserMock.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   tests/unit/User/UserMock.php   Download  
File: tests/unit/User/UserMock.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 470 bytes
 

Contents

Class file image Download
<?php

class UserMock {
    public
$loggedin = false;
    public
$data = array();
   
    public function
__construct() {
    }

    public function
get($key='') {
        return isset(
$this->data[$key]) ? $this->data[$key] : null;
    }
   
    public function
set($key, $value) {
       
$this->data[$key] = $value;
        return
$this;
    }
   
    public function
setLoggedIn($loggedin) {
       
$this->loggedin = $loggedin;
    }

    public function
isLoggedIn() {
        return
$this->loggedin;
    }
}