-
Notifications
You must be signed in to change notification settings - Fork 11
/
cohen.php
38 lines (34 loc) · 901 Bytes
/
cohen.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* This is a demo class for
* @Author: Jingrong Tian ([email protected])
* @DateTime: 2015-09-25 22:14:28
* @Description: Description
*/
include_once('api.php');
class Cohen
{
function __construct()
{
}
/**
* a demo funtion
* @param string $user_name The user`s name of this function.
* @return string Print the user.
*/
public function hello_world ($user_name) {
return 'Welcome to cohen`s world, dear ' . $user_name;
}
public static function make_api() {
$api = new Api('Cohen', 'hello_world', 'A demo function.');
$api->add_property('user_name', 'Your Name');
$api->set_path('cohen.php');
$apis = array();
$apis[] = $api;
$results = array(
'classname' => 'Cohen',
'apis' => $apis
);
return $results;
}
}