PHP 手册
上一页 |  | 下一页

# SoapServer->setPersistence()

(no version information, might be only in CVS)

SoapServer->setPersistence() -- Sets persistence mode of SoapServer

## 说明

class SoapServer {
void setPersistence ( int mode )
}

This function allows saving data between requests in a PHP session. It works only with a server that exports functions from a class with SoapServer->setClass().

## 参数

`mode`

  One of the `SOAP_PERSISTENCE_XXX` constants.

## 返回值

无返回值。

## 范例

例 1. Some examples

`<?php $server->setPersistence(SOAP_PERSISTENCE_SESSION); $server->setPersistence(SOAP_PERSISTENCE_REQUEST); ?>`

> 注意: The persistence `SOAP_PERSISTENCE_SESSION` makes persistent only object of given class, but not the class static data. You may use $this->bar instead of self::$bar.

## 参见

SoapServer->__construct()
SoapServer->setClass()

上一页 | 起始页 | 下一页
SoapServer->setClass() | 上一级 | SoapVar->__construct()