PHP 手冊
前一頁 |  | 下一頁

# SoapServer->setClass()

SoapServer->setClass() -- Sets class which will handle SOAP requests

## Description

class SoapServer {
void setClass ( string class_name [, mixed args] )
}

Exports all methods from specified class.

The object can be made persistent across request for a given PHP session with the SoapServer->setPersistence() method.

## Parameters

class_name

  The name of the exported class.

args

  This optional parameter will be passed to the default class constructor during object creation.

## Return Values

No value is returned.

## 範例

範例 1. Some examples

`<?php class foo { function foo() { } } $server->setClass("foo"); class bar { function bar($x, $y) { } } $server->setClass("bar", $arg1, $arg2); ?>`

## 參考

SoapServer->__construct()
SoapServer->addFunction()
SoapServer->setPersistence()

前一頁 | 內容 | 下一頁
SoapServer->handle() | 上一層 | SoapServer->setPersistence()