Source for file Value.php
Documentation is available at Value.php
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.02 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Shane Caraveo <Shane@Caraveo.com> Port to PEAR and more |
// | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author |
// +----------------------------------------------------------------------+
// $Id: Value.php,v 1.39 2005/05/03 21:12:43 chagenbu Exp $
require_once 'SOAP/Base.php';
* This class converts values between PHP and SOAP.
* Originally based on SOAPx4 by Dietrich Ayala
* http://dietrich.ganx4.com/soapx4
* @author Shane Caraveo <shane@php.net> Conversion to PEAR and updates
* @author Dietrich Ayala <dietrich@ganx4.com> Original Author
* @param string $name name of the soap-value {namespace}name
* @param mixed $type soap value {namespace}type, if not set an automatic
* @param mixed $value value to set
* @param array $attributes (optional) Attributes.
function SOAP_Value($name = '', $type = false , $value = null , $attributes = array ())
// Detect type if not passed.
$this->type_prefix = $this->tqn->ns;
* @param SOAP_Base &$serializer A SOAP_Base instance or subclass to serialize with.
* @return string XML representation of $this.
* This class converts values between PHP and SOAP. It is a simple
* wrapper around SOAP_Value, adding support for SOAP actor and
* mustunderstand parameters.
* Originally based on SOAPx4 by Dietrich Ayala
* http://dietrich.ganx4.com/soapx4
* @author Shane Caraveo <shane@php.net> Conversion to PEAR and updates
* @author Dietrich Ayala <dietrich@ganx4.com> Original Author
* @param string $name name of the soap-value {namespace}name
* @param mixed $type soap value {namespace}type, if not set an automatic
* @param mixed $value value to set
* @param integer $mustunderstand Zero or one.
* @param mixed $attributes (optional) Attributes.
parent ::SOAP_Value ($name, $type, $value, $attributes);
$this->attributes['SOAP-ENV:actor'] = $actor;
} elseif (!isset ($this->attributes['SOAP-ENV:actor'])) {
$this->attributes['SOAP-ENV:actor'] = 'http://schemas.xmlsoap.org/soap/actor/next';
$this->attributes['SOAP-ENV:mustUnderstand'] = (int) $mustunderstand;
* this class converts values between PHP and SOAP
* it handles Mime attachements per W3C Note on Soap Attachements at
* http://www.w3.org/TR/SOAP-attachments
* @package SOAP::Attachment
* @author Shane Caraveo <shane@php.net> Conversion to PEAR and updates
* @param string name of the soap-value <value_name>
* @param mixed soap header value
* @param string namespace
if (!isset ($SOAP_options['Mime'])) {
return PEAR ::raiseError ('Mail_mime is not installed, unable to support SOAP Attachements');
parent ::SOAP_Value ($name, null , null );
$filedata = ($file === null ) ? $this->_file2str ($filename) : $file;
if (PEAR ::isError ($filedata)) {
$this->attributes['href'] = 'cid:'. $cid;
$this->options['attachment'] = array (
'disposition' => $filename,
* Returns the contents of the given file name as string
* @param string $file_name
function &_file2str ($file_name)
return PEAR ::raiseError ('File is not readable ' . $file_name);
if (!$fd = fopen($file_name, 'rb')) {
return PEAR ::raiseError ('Could not open ' . $file_name);
Documentation generated on Mon, 11 Mar 2019 14:20:05 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|