Initial commit
This commit is contained in:
34
api-wiaas/server/components/v1/contact/ContactController.php
Normal file
34
api-wiaas/server/components/v1/contact/ContactController.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Controller for contact page
|
||||
*/
|
||||
class ContactController{
|
||||
private $model;
|
||||
|
||||
function __construct(){
|
||||
$this->model = new ContactModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* get contact information
|
||||
* @return json list of contacts
|
||||
*/
|
||||
public function getContactInfo(){
|
||||
echo json_encode($this->model->getContactInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* include contact template
|
||||
*/
|
||||
public function contactTemplate(){
|
||||
global $user;
|
||||
require_once('templates/ContactTemplate.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* open contact page
|
||||
*/
|
||||
public function showPage(){
|
||||
require_once('ContactPage.php');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user