/usr/share/php/Horde/Compress/Tnef/Object.php is in php-horde-compress 2.2.1-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | <?php
/**
* Copyright 2002-2017 Horde LLC (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (LGPL). If you
* did not receive this file, see http://www.horde.org/licenses/lgpl21.
*
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @category Horde
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Compress
*/
/**
* Base object for any files/attachments encapsulated in a TNEF file.
*
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @category Horde
* @copyright 2002-2017 Horde LLC
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Compress
*/
class Horde_Compress_Tnef_Object
{
/**
*
* @var Horde_Log_Logger
*/
protected $_logger;
/**
*
* @var string
*/
protected $_data;
/**
*
* @var array
*/
protected $_options;
public function __construct($logger, $data = null, $options = array())
{
$this->_data = $data;
$this->_logger = $logger;
$this->_options = $options;
}
/**
* Allow this object to set any TNEF attributes it needs to know about,
* ignore any it doesn't care about.
*
* @param integer $attribute The attribute descriptor.
* @param mixed $value The value from the MAPI stream.
* @param integer $size The byte length of the data, as reported by
* the MAPI data.
*/
public function setTnefAttribute($attribute, $value, $size)
{
}
/**
* Allow this object to set any MAPI attributes it needs to know about,
* ignore any it doesn't care about.
*
* @param integer $type The attribute type descriptor.
* @param integer $name The attribute name descriptor.
*/
public function setMapiAttribute($type, $name, $value)
{
}
/**
* Output the data for this object in an array.
*
* @return array
* - type: (string) The MIME type of the content.
* - subtype: (string) The MIME subtype.
* - name: (string) The filename.
* - stream: (string) The file data.
*/
public function toArray()
{
}
/**
* Pop specified number of bytes from the buffer.
*
* @param string &$data The data string.
* @param integer $bytes How many bytes to retrieve.
*
* @return string The specified number of bytes from $data.
*/
protected function _getx(&$data, $bytes)
{
$value = null;
if (strlen($data) >= $bytes) {
$value = substr($data, 0, $bytes);
$data = substr_replace($data, '', 0, $bytes);
}
return $value;
}
/**
* Pop specified number of bits from the buffer
*
* @param string &$data The data string.
* @param integer $bits How many bits to retrieve.
*
* @return integer The value from $data.
*/
protected function _geti(&$data, $bits)
{
$bytes = $bits / 8;
$value = null;
if (strlen($data) >= $bytes) {
$value = ord($data[0]);
if ($bytes >= 2) {
$value += (ord($data[1]) << 8);
}
if ($bytes >= 4) {
$value += (ord($data[2]) << 16) + (ord($data[3]) << 24);
}
$data = substr_replace($data, '', 0, $bytes);
}
return $value;
}
}
|