新建一個php文件
require_once
然後定義一個Employee類
class Employee
{
public $Id;
public $Name;
public $Email;
public $Salary;
function __construct($id
{
$this
$this
$this
$this
}
}
接下來是EmployeeService類
class EmployeeService extends MSAjaxService
{
function GetEmployee()
{
return new Employee(
}
}
然後新建一個EmployeeService的實例
$theService = new EmployeeService();
$theService
大功告成!
From:http://tw.wingwit.com/Article/program/PHP/201311/20846.html