<?php
require 'Users.php';
class Server extends Users{
protected $users;
protected $workspaces;
protected $expired;
public function Initialization(){
$this->users = array(
'Peter',
'Iron',
'Jack',
'John',
'Tom',
'David',
'Ausir',
'Mary',
'Alex',
'Bob',
'Selina'
);
$this->workspaces = '/tmp/Users';
$this->expired = 5;
}
public function createUsers(){
$this->setWorkspaces($this->workspaces);
$this->setExpired($this->expired);
foreach($this->users as $user):
$this->createUser($user);
endforeach;
$response['responseStatus'] = true;
$response['responseText'] = array('users' => $this->users);
echo json_encode($response);
}
public function __construct(){
$this->Initialization();
}
}
$Server = new Server();
$Server->createUsers();
?>
|