示例#1
0
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $data = Transform::toInt8($this->_encoding) . $this->_currency . $this->_price . "" . $this->_date;
     switch ($this->_encoding) {
         case self::UTF16:
             $data .= Transform::toString16($this->_seller);
             break;
         case self::UTF16BE:
             $data .= Transform::toString16BE($this->_seller);
             break;
         case self::UTF16LE:
             $data .= Transform::toString16LE($this->_seller);
             break;
         default:
             $data .= $this->_seller;
     }
     $this->setData($data);
     return parent::__toString();
 }
示例#2
0
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $data = Transform::toInt8($this->_encoding) . $this->_price . "" . $this->_date . $this->_contact . "" . Transform::toInt8($this->_delivery);
     switch ($this->_encoding) {
         case self::UTF16:
             $data .= Transform::toString16($this->_seller) . "" . Transform::toString16($this->_description) . "";
             break;
         case self::UTF16BE:
             $data .= Transform::toString16BE($this->_seller) . "";
             Transform::toString16($this->_description) . "";
             break;
         case self::UTF16LE:
             $data .= Transform::toString16LE($this->_seller) . "";
             Transform::toString16($this->_description) . "";
             break;
         default:
             $data .= $this->_seller . "" . $this->_description . "";
     }
     parent::setData($data . ($this->_mimeType ? $this->_mimeType . "" . $this->_imageData : 0));
     return parent::__toString();
 }
示例#3
0
文件: WXXX.php 项目: rtdean93/therock
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding);
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $data .= Transform::toString16
       ($this->_description, $this->_encoding == self::UTF16 ?
        Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER) .
       "\0\0";
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE($this->_description) . "\0\0";
     break;
   default:
     $data .= $this->_description . "\0";
   }
   $this->setData($data . $this->_link);
   return ID3_Frame::__toString();
 }
示例#4
0
文件: OWNE.php 项目: rtdean93/therock
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding) . $this->_currency .
     $this->_price . "\0" . $this->_date;
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $data .= Transform::toString16
       ($this->_seller, $this->_encoding == self::UTF16 ?
        Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER);
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE($this->_seller);
     break;
   default:
     $data .= $this->_seller;
   }
   $this->setData($data);
   return parent::__toString();
 }
示例#5
0
文件: COMR.php 项目: rtdean93/therock
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding) . $this->_currency .
     $this->_price . "\0" . $this->_date . $this->_contact . "\0" .
     Transform::toUInt8($this->_delivery);
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $order = $this->_encoding == self::UTF16 ?
       Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER;
     $data .= Transform::toString16($this->_seller, $order) . "\0\0" .
       Transform::toString16($this->_description, $order) . "\0\0";
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE
       ($this->_seller . "\0\0" . $this->_description . "\0\0");
     break;
   default:
     $data .= $this->_seller . "\0" . $this->_description . "\0";
   }
   parent::setData
     ($data . ($this->_mimeType ?
               $this->_mimeType . "\0" . $this->_imageData : ""));
   return parent::__toString();
 }
示例#6
0
文件: SYLT.php 项目: rtdean93/therock
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding) . $this->_language .
     Transform::toUInt8($this->_format) . Transform::toUInt8($this->_type);
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $data .= Transform::toString16
       ($this->_description, $this->_encoding == self::UTF16 ?
        Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER) .
       "\0\0";
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE($this->_description) . "\0\0";
     break;
   default:
     $data .= $this->_description . "\0";
   }
   foreach ($this->_events as $timestamp => $syllable) {
     switch ($this->_encoding) {
     case self::UTF16:
     case self::UTF16LE:
       $data .= Transform::toString16
         ($syllable, $this->_encoding == self::UTF16 ?
          Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER) .
         "\0\0";
       break;
     case self::UTF16BE:
       $data .= Transform::toString16BE($syllable) . "\0\0";
       break;
     default:
       $data .= $syllable . "\0";
     }
     $data .= Transform::toUInt32BE($timestamp);
   }
   $this->setData($data);
   return parent::__toString();
 }
示例#7
0
文件: GEOB.php 项目: rtdean93/therock
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding) . $this->_mimeType . "\0";
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $order = $this->_encoding == self::UTF16 ?
       Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER;
     $data .= Transform::toString16($this->_filename, $order) . "\0\0" .
       Transform::toString16($this->_description, $order) . "\0\0";
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE
       ($this->_filename . "\0\0" . $this->_description . "\0\0");
     break;
   default:
     $data .= $this->_filename . "\0" . $this->_description . "\0";
   }
   $this->setData($data . $this->_objectData);
   return parent::__toString();
 }
示例#8
0
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding);
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $array = $this->_text;
     foreach ($array as &$text)
       $text = Transform::toString16($text);
     $data .= Transform::toString16
       (implode("\0\0", $array), $this->_encoding == self::UTF16 ?
        Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER);
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE(implode("\0\0", $this->_text));
     break;
   default:
     $data .= implode("\0", $this->_text);
   }
   $this->setData($data);
   return parent::__toString();
 }
示例#9
0
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $data = Transform::toInt8($this->_encoding);
     switch ($this->_encoding) {
         case self::UTF16:
             $data .= Transform::toString16($this->_description) . "" . Transform::toString16($this->_text[0]);
             break;
         case self::UTF16BE:
             $data .= Transform::toString16BE($this->_description) . "" . Transform::toString16BE($this->_text[0]);
             break;
         case self::UTF16LE:
             $data .= Transform::toString16LE($this->_description) . "" . Transform::toString16LE($this->_text[0]);
             break;
         default:
             $data .= $this->_description . "" . $this->_text[0];
     }
     $this->setData($data);
     return parent::__toString();
 }
示例#10
0
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $data = Transform::toInt8($this->_encoding);
     foreach ($this->_people as $entry) {
         foreach ($entry as $key => $val) {
             switch ($this->_encoding) {
                 case self::UTF16:
                     $data .= Transform::toString16($key . "" . $val . "");
                     break;
                 case self::UTF16BE:
                     $data .= Transform::toString16BE($key . "" . $val . "");
                     break;
                 case self::UTF16LE:
                     $data .= Transform::toString16LE($key . "" . $val . "");
                     break;
                 default:
                     $data .= $key . "" . $val . "";
             }
         }
     }
     $this->setData($data);
     return parent::__toString();
 }
示例#11
0
文件: USER.php 项目: rtdean93/therock
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding) . $this->_language;
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $data .= Transform::toString16
       ($this->_text, $this->_encoding == self::UTF16 ?
        Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER);
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE($this->_text);
     break;
   default:
     $data .= $this->_text;
   }
   $this->setData($data);
   return parent::__toString();
 }
示例#12
0
文件: IPLS.php 项目: rtdean93/therock
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding);
   $order = $this->_encoding == self::UTF16 ?
     Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER;
   foreach ($this->_people as $entry) {
     foreach ($entry as $key => $val) {
       switch ($this->_encoding) {
       case self::UTF16:
       case self::UTF16LE:
         $data .= Transform::toString16($key, $order) . "\0\0" .
                  Transform::toString16($val, $order) . "\0\0";
         break;
       case self::UTF16BE:
         $data .= Transform::toString16BE($key . "\0\0" . $val . "\0\0");
         break;
       default:
         $data .= $key . "\0" . $val . "\0";
       }
     }
   }
   $this->setData($data);
   return parent::__toString();
 }
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $data = Transform::toInt8($this->_encoding);
     switch ($this->_encoding) {
         case self::UTF16:
             $data .= Transform::toString16(implode("", $this->_text));
             break;
         case self::UTF16BE:
             $data .= Transform::toString16BE(implode("", $this->_text));
             break;
         case self::UTF16LE:
             $data .= Transform::toString16LE(implode("", $this->_text));
             break;
         default:
             $data .= implode("", $this->_text);
     }
     $this->setData($data);
     return parent::__toString();
 }
示例#14
0
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $data = Transform::toInt8($this->_encoding) . $this->_mimeType . "" . Transform::toInt8($this->_imageType);
     switch ($this->_encoding) {
         case self::UTF16:
             $data .= Transform::toString16($this->_description) . "";
             break;
         case self::UTF16BE:
             $data .= Transform::toString16BE($this->_description) . "";
             break;
         case self::UTF16LE:
             $data .= Transform::toString16LE($this->_description) . "";
             break;
         default:
             $data .= $this->_description . "";
     }
     parent::setData($data . $this->_imageData);
     return parent::__toString();
 }
示例#15
0
文件: APIC.php 项目: rtdean93/therock
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toUInt8($this->_encoding) . $this->_mimeType . "\0" .
     Transform::toUInt8($this->_imageType);
   switch ($this->_encoding) {
   case self::UTF16:
   case self::UTF16LE:
     $data .= Transform::toString16
       ($this->_description, $this->_encoding == self::UTF16 ?
        Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER) .
       "\0\0";
     break;
   case self::UTF16BE:
     $data .= Transform::toString16BE($this->_description) . "\0\0";
     break;
   default:
     $data .= $this->_description . "\0";
   }
   parent::setData($data . $this->_imageData);
   return parent::__toString();
 }
示例#16
0
 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $data = Transform::toInt8($this->_encoding) . $this->_language;
     switch ($this->_encoding) {
         case self::UTF16:
             $data .= Transform::toString16($this->_text);
             break;
         case self::UTF16BE:
             $data .= Transform::toString16BE($this->_text);
             break;
         case self::UTF16LE:
             $data .= Transform::toString16LE($this->_text);
             break;
         default:
             $data .= $this->_text;
     }
     $this->setData($data);
     return parent::__toString();
 }