File indexing completed on 2024-12-22 05:36:27
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Amf 0017 * @subpackage Value 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 /** 0024 * Message Headers provide context for the processing of the 0025 * the AMF Packet and all subsequent Messages. 0026 * 0027 * Multiple Message Headers may be included within an AMF Packet. 0028 * 0029 * @package Zend_Amf 0030 * @subpackage Value 0031 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0032 * @license http://framework.zend.com/license/new-bsd New BSD License 0033 */ 0034 class Zend_Amf_Value_MessageHeader 0035 { 0036 /** 0037 * Name of the header 0038 * 0039 * @var string 0040 */ 0041 public $name; 0042 0043 /** 0044 * Flag if the data has to be parsed on return 0045 * 0046 * @var boolean 0047 */ 0048 public $mustRead; 0049 0050 /** 0051 * Length of the data field 0052 * 0053 * @var int 0054 */ 0055 public $length; 0056 0057 /** 0058 * Data sent with the header name 0059 * 0060 * @var mixed 0061 */ 0062 public $data; 0063 0064 /** 0065 * Used to create and store AMF Header data. 0066 * 0067 * @param String $name 0068 * @param Boolean $mustRead 0069 * @param misc $content 0070 * @param integer $length 0071 */ 0072 public function __construct($name, $mustRead, $data, $length=null) 0073 { 0074 $this->name = $name; 0075 $this->mustRead = (bool) $mustRead; 0076 $this->data = $data; 0077 if (null !== $length) { 0078 $this->length = (int) $length; 0079 } 0080 } 0081 }