Ejemplo n.º 1
0
 /**
  * Tests Zend_Id3::analyze()
  */
 public function testAnalyzeFileForId3V1Tags()
 {
     $response = $this->_zendId3->analyze(dirname(__FILE__) . '/Id3/_files/demo.mp3');
     $this->assertType('array', $response);
     $this->assertTrue(isset($response['id3v1']));
     $this->assertEquals('Juman Sucks', $response['id3v1']['album']);
     $this->assertEquals("Llama Whippin' Intro", $response['id3v1']['title']);
     $this->assertEquals('Nullsoft', $response['id3v1']['artist']);
 }
Ejemplo n.º 2
0
 /**
  * Sets the file position indicator for the file
  *
  * @param integer $bytes
  * @param integer $whence
  * @return integer|null
  */
 protected function fseek($bytes, $whence = SEEK_SET)
 {
     if ($this->_dataStringFlag) {
         switch ($whence) {
             case SEEK_SET:
                 $this->_dataStringPosition = $bytes;
                 return;
             case SEEK_CUR:
                 $this->_dataStringPosition += $bytes;
                 return;
             case SEEK_END:
                 $this->_dataStringPosition = strlen($this->_dataString) + $bytes;
                 return;
         }
     }
     return fseek($this->_id3->getFilePointer(), $bytes, $whence);
 }