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 Parse 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 * Base abstract class for all AMF serializers. 0025 * 0026 * @package Zend_Amf 0027 * @subpackage Parse 0028 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0029 * @license http://framework.zend.com/license/new-bsd New BSD License 0030 */ 0031 abstract class Zend_Amf_Parse_Serializer 0032 { 0033 /** 0034 * Reference to the current output stream being constructed 0035 * 0036 * @var string 0037 */ 0038 protected $_stream; 0039 0040 /** 0041 * str* functions overloaded using mbstring.func_overload 0042 * 0043 * @var bool 0044 */ 0045 protected $mbStringFunctionsOverloaded; 0046 0047 /** 0048 * Constructor 0049 * 0050 * @param Zend_Amf_Parse_OutputStream $stream 0051 * @return void 0052 */ 0053 public function __construct(Zend_Amf_Parse_OutputStream $stream) 0054 { 0055 $this->_stream = $stream; 0056 $this->_mbStringFunctionsOverloaded = function_exists('mb_strlen') && (ini_get('mbstring.func_overload') !== '') && ((int)ini_get('mbstring.func_overload') & 2); 0057 } 0058 0059 /** 0060 * Find the PHP object type and convert it into an AMF object type 0061 * 0062 * @param mixed $content 0063 * @param int $markerType 0064 * @param mixed $contentByVal 0065 * @return void 0066 */ 0067 public abstract function writeTypeMarker(&$content, $markerType = null, $contentByVal = false); 0068 }