本文整理汇总了PHP中Zend_Media_Id3_Frame类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Media_Id3_Frame类的具体用法?PHP Zend_Media_Id3_Frame怎么用?PHP Zend_Media_Id3_Frame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_Media_Id3_Frame类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
Zend_Media_Id3_Frame::__construct($reader, $options);
$this->setEncoding($this->getOption('encoding', Zend_Media_Id3_Encoding::UTF8));
if ($this->_reader === null) {
return;
}
$encoding = $this->_reader->readUInt8();
$this->_language = strtolower($this->_reader->read(3));
if ($this->_language == 'xxx' || trim($this->_language, "") == '') {
$this->_language = 'und';
}
switch ($encoding) {
case self::UTF16:
// break intentionally omitted
// break intentionally omitted
case self::UTF16BE:
list($this->_description, $this->_text) = $this->_explodeString16($this->_reader->read($this->_reader->getSize()), 2);
$this->_description = $this->_convertString($this->_description, $encoding);
$this->_text = $this->_convertString($this->_text, $encoding);
break;
case self::UTF8:
// break intentionally omitted
// break intentionally omitted
default:
list($this->_description, $this->_text) = $this->_convertString($this->_explodeString8($this->_reader->read($this->_reader->getSize()), 2), $encoding);
break;
}
}
开发者ID:lokamaya,项目名称:zend-mp3,代码行数:36,代码来源:Uslt.php
示例2: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
Zend_Media_Id3_Frame::__construct($reader, $options);
$this->setEncoding($this->getOption('encoding', Zend_Media_Id3_Encoding::UTF8));
if ($this->_reader === null) {
return;
}
$encoding = $this->_reader->readUInt8();
switch ($encoding) {
case self::UTF16:
// break intentionally omitted
// break intentionally omitted
case self::UTF16BE:
list($this->_description, $this->_link) = $this->_explodeString16($this->_reader->read($this->_reader->getSize()), 2);
break;
case self::UTF8:
// break intentionally omitted
// break intentionally omitted
default:
list($this->_description, $this->_link) = $this->_explodeString8($this->_reader->read($this->_reader->getSize()), 2);
break;
}
$this->_description = $this->_convertString($this->_description, $encoding);
$this->_link = implode($this->_explodeString8($this->_link, 1), '');
}
开发者ID:jreinert,项目名称:RuneUI,代码行数:32,代码来源:Wxxx.php
示例3: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
Zend_Media_Id3_Frame::__construct($reader, $options);
$this->setEncoding(Zend_Media_Id3_Encoding::ISO88591);
if ($this->_reader === null) {
return;
}
$this->_reader->skip(1);
$this->setText($this->_reader->readString8($this->_reader->getSize()));
}
开发者ID:andreiamfg,项目名称:MobileWebHybrid,代码行数:17,代码来源:NumberFrame.php
示例4: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
Zend_Media_Id3_Frame::__construct($reader, $options);
$this->setEncoding(Zend_Media_Id3_Encoding::ISO88591);
if ($this->_reader === null) {
return;
}
$this->_reader->skip(1);
$this->setText($this->_reader->readString8($this->_reader->getSize()));
$this->_country = substr($this->getText(), 0, 2);
$this->_registrant = substr($this->getText(), 2, 3);
$this->_year = substr($this->getText(), 5, 2);
$this->_uniqueNumber = substr($this->getText(), 7, 5);
}
开发者ID:lokamaya,项目名称:zend-mp3,代码行数:21,代码来源:Tsrc.php
示例5: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
$this->setEncoding($this->getOption('encoding', Zend_Media_Id3_Encoding::UTF8));
if ($this->_reader === null) {
return;
}
$encoding = $this->_reader->readUInt8();
$this->_language = strtolower($this->_reader->read(3));
if ($this->_language == 'xxx') {
$this->_language = 'und';
}
switch ($encoding) {
case self::UTF16:
// break intentionally omitted
// break intentionally omitted
case self::UTF16BE:
$this->_text = $this->_convertString($this->_reader->readString16($this->_reader->getSize()), $encoding);
break;
case self::UTF8:
// break intentionally omitted
// break intentionally omitted
default:
$this->_text = $this->_convertString($this->_reader->readString8($this->_reader->getSize()), $encoding);
break;
}
}
开发者ID:sb15,项目名称:zend-ex-legacy,代码行数:34,代码来源:LanguageTextFrame.php
示例6: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($this->_reader !== null) {
$this->_link = implode($this->_explodeString8($this->_reader->read($this->_reader->getSize()), 1), '');
}
}
开发者ID:google-code-backups,项目名称:php-reader,代码行数:14,代码来源:LinkFrame.php
示例7: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
$this->setEncoding($this->getOption('encoding', Zend_Media_Id3_Encoding::UTF8));
if ($this->_reader === null) {
return;
}
$data = array();
$encoding = $this->_reader->readUInt8();
switch ($encoding) {
case self::UTF16:
// break intentionally omitted
// break intentionally omitted
case self::UTF16BE:
$data = $this->_explodeString16($this->_reader->read($this->_reader->getSize()));
foreach ($data as &$str) {
$str = $this->_convertString($str, $encoding);
}
break;
case self::UTF8:
// break intentionally omitted
// break intentionally omitted
default:
$data = $this->_convertString($this->_explodeString8($this->_reader->read($this->_reader->getSize())), $encoding);
break;
}
for ($i = 0; $i < count($data) - 1; $i += 2) {
$this->_people[] = array($data[$i] => @$data[$i + 1]);
}
}
开发者ID:hjoelr,项目名称:com_mediasyndicator,代码行数:37,代码来源:Ipls.php
示例8: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
$this->setEncoding($this->getOption('encoding', Zend_Media_Id3_Encoding::UTF8));
if ($this->_reader === null) {
return;
}
$encoding = $this->_reader->readUInt8();
list($this->_mimeType) = $this->_explodeString8($this->_reader->read($this->_reader->getSize()), 2);
$this->_reader->setOffset(1 + strlen($this->_mimeType) + 1);
switch ($encoding) {
case self::UTF16:
// break intentionally omitted
// break intentionally omitted
case self::UTF16BE:
list($this->_filename, $this->_description, $this->_data) = $this->_explodeString16($this->_reader->read($this->_reader->getSize()), 3);
break;
case self::UTF8:
// break intentionally omitted
// break intentionally omitted
default:
list($this->_filename, $this->_description, $this->_data) = $this->_explodeString8($this->_reader->read($this->_reader->getSize()), 3);
break;
}
$this->_filename = $this->_convertString($this->_filename, $encoding);
$this->_description = $this->_convertString($this->_description, $encoding);
}
开发者ID:lokamaya,项目名称:zend-mp3,代码行数:34,代码来源:Geob.php
示例9: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($this->_reader === null) {
return;
}
$flags = $this->_reader->readInt8();
$descriptionBits = $this->_reader->readInt8();
if ($descriptionBits <= 8 || $descriptionBits > 16) {
require_once 'Zend/Media/Id3/Exception.php';
throw new Zend_Media_Id3_Exception('Unsupported description bit size of: ' . $descriptionBits);
}
$this->_adjustments[self::right] = ($flags & 0x1) == 0x1 ? $this->_reader->readUInt16BE() : -$this->_reader->readUInt16BE();
$this->_adjustments[self::left] = ($flags & 0x2) == 0x2 ? $this->_reader->readUInt16BE() : -$this->_reader->readUInt16BE();
$this->_adjustments[self::peakRight] = $this->_reader->readUInt16BE();
$this->_adjustments[self::peakLeft] = $this->_reader->readUInt16BE();
if (!$this->_reader->available()) {
return;
}
$this->_adjustments[self::rightBack] = ($flags & 0x4) == 0x4 ? $this->_reader->readUInt16BE() : -$this->_reader->readUInt16BE();
$this->_adjustments[self::leftBack] = ($flags & 0x8) == 0x8 ? $this->_reader->readUInt16BE() : -$this->_reader->readUInt16BE();
$this->_adjustments[self::peakRightBack] = $this->_reader->readUInt16BE();
$this->_adjustments[self::peakLeftBack] = $this->_reader->readUInt16BE();
if (!$this->_reader->available()) {
return;
}
$this->_adjustments[self::center] = ($flags & 0x10) == 0x10 ? $this->_reader->readUInt16BE() : -$this->_reader->readUInt16BE();
$this->_adjustments[self::peakCenter] = $this->_reader->readUInt16BE();
if (!$this->_reader->available()) {
return;
}
$this->_adjustments[self::bass] = ($flags & 0x20) == 0x20 ? $this->_reader->readUInt16BE() : -$this->_reader->readUInt16BE();
$this->_adjustments[self::peakBass] = $this->_reader->readUInt16BE();
}
开发者ID:hjoelr,项目名称:com_mediasyndicator,代码行数:41,代码来源:Rvad.php
示例10: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($this->_reader === null) {
return;
}
list($this->_owner, $this->_fileIdentifier) = $this->_explodeString8($this->_reader->read($this->_reader->getSize()), 2);
}
开发者ID:andreiamfg,项目名称:MobileWebHybrid,代码行数:15,代码来源:Ufid.php
示例11: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($this->_reader === null) {
return;
}
$this->_data = $this->_reader->read($this->_reader->getSize());
}
开发者ID:google-code-backups,项目名称:php-reader,代码行数:15,代码来源:Mcdi.php
示例12: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($this->_reader === null) {
return;
}
$this->_minOffset = $this->_reader->readInt32BE();
}
开发者ID:hjoelr,项目名称:com_mediasyndicator,代码行数:15,代码来源:Seek.php
示例13: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
$this->setEncoding($this->getOption('encoding', Zend_Media_Id3_Encoding::UTF8));
if ($this->_reader === null) {
return;
}
$encoding = $this->_reader->readUInt8();
$this->_language = strtolower($this->_reader->read(3));
if ($this->_language == 'xxx' || trim($this->_language, "") == '') {
$this->_language = 'und';
}
$this->_format = $this->_reader->readUInt8();
$this->_type = $this->_reader->readUInt8();
$offset = $this->_reader->getOffset();
switch ($encoding) {
case self::UTF16:
// break intentionally omitted
// break intentionally omitted
case self::UTF16BE:
list($this->_description) = $this->_explodeString16($this->_reader->read($this->_reader->getSize()), 2);
if ($this->_reader->getSize() >= $offset + strlen($this->_description) + 2) {
$this->_reader->setOffset($offset + strlen($this->_description) + 2);
}
break;
case self::UTF8:
// break intentionally omitted
// break intentionally omitted
default:
list($this->_description) = $this->_explodeString8($this->_reader->read($this->_reader->getSize()), 2);
if ($this->_reader->getSize() >= $offset + strlen($this->_description) + 1) {
$this->_reader->setOffset($offset + strlen($this->_description) + 1);
}
break;
}
$this->_description = $this->_convertString($this->_description, $encoding);
while ($this->_reader->available()) {
$offset = $this->_reader->getOffset();
switch ($encoding) {
case self::UTF16:
// break intentionally omitted
// break intentionally omitted
case self::UTF16BE:
list($syllable) = $this->_explodeString16($this->_reader->read($this->_reader->getSize()), 2);
$this->_reader->setOffset($offset + strlen($syllable) + 2);
break;
case self::UTF8:
// break intentionally omitted
// break intentionally omitted
default:
list($syllable) = $this->_explodeString8($this->_reader->read($this->_reader->getSize()), 2);
$this->_reader->setOffset($offset + strlen($syllable) + 1);
break;
}
$this->_events[$this->_reader->readUInt32BE()] = $this->_convertString($syllable, $encoding);
}
ksort($this->_events);
}
开发者ID:google-code-backups,项目名称:php-reader,代码行数:65,代码来源:Sylt.php
示例14: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($this->_reader === null) {
return;
}
$this->_format = $this->_reader->readUInt8();
$this->_position = $this->_reader->readUInt32BE();
}
开发者ID:andreiamfg,项目名称:MobileWebHybrid,代码行数:16,代码来源:Poss.php
示例15: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($this->_reader === null) {
return;
}
$this->_group = $this->_reader->readUInt8();
$this->_signature = $this->_reader->read($this->_reader->getSize());
}
开发者ID:hjoelr,项目名称:com_mediasyndicator,代码行数:16,代码来源:Sign.php
示例16: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($this->_reader === null) {
return;
}
list($this->_owner, ) = $this->_explodeString8($this->_reader->read($this->_reader->getSize()), 2);
$this->_reader->setOffset(strlen($this->_owner) + 1);
$this->_method = $this->_reader->readInt8();
$this->_encryptionData = $this->_reader->read($this->_reader->getSize());
}
开发者ID:lokamaya,项目名称:zend-mp3,代码行数:18,代码来源:Encr.php
示例17: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($this->_reader === null) {
return;
}
list($this->_owner) = $this->_explodeString8($this->_reader->read($this->_reader->getSize()), 2);
$this->_reader->setOffset(strlen($this->_owner) + 1);
$this->_previewStart = $this->_reader->readUInt16BE();
$this->_previewLength = $this->_reader->readUInt16BE();
$this->_encryptionInfo = $this->_reader->read($this->_reader->getSize());
}
开发者ID:hjoelr,项目名称:com_mediasyndicator,代码行数:19,代码来源:Aenc.php
示例18: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($this->_reader === null) {
throw new Zend_Media_Id3_Exception('Write not supported yet');
}
$this->_frames = Transform::fromInt16BE(substr($this->_data, 0, 2));
$this->_bytes = Transform::fromInt32BE(substr($this->_data, 2, 3));
$this->_milliseconds = Transform::fromInt32BE(substr($this->_data, 5, 3));
$byteDevBits = Transform::fromInt8($this->_data[8]);
$millisDevBits = Transform::fromInt8($this->_data[9]);
// $data = substr($this->_data, 10);
}
开发者ID:lokamaya,项目名称:zend-mp3,代码行数:20,代码来源:Mllt.php
示例19: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($this->_reader === null) {
return;
}
if ($this->_reader->getSize() > 4) {
$this->_counter = $this->_reader->readInt64BE();
// UInt64
} else {
$this->_counter = $this->_reader->readUInt32BE();
}
}
开发者ID:adam-fonseca,项目名称:RuneUI,代码行数:20,代码来源:Pcnt.php
示例20: __construct
/**
* Constructs the class with given parameters and parses object related
* data.
*
* @param Zend_Io_Reader $reader The reader object.
* @param Array $options The options array.
*/
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
if ($this->_reader === null) {
return;
}
$this->_interpolation = $this->_reader->readInt8();
list($this->_device) = $this->_explodeString8($this->_reader->read($this->_reader->getSize()), 2);
$this->_reader->setOffset(1 + strlen($this->_device) + 1);
while ($this->_reader->available()) {
$this->_adjustments[(int) ($this->_reader->readUInt16BE() / 2)] = $this->_reader->readInt16BE() / 512.0;
}
ksort($this->_adjustments);
}
开发者ID:lokamaya,项目名称:zend-mp3,代码行数:21,代码来源:Equ2.php
注:本文中的Zend_Media_Id3_Frame类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论