PageRenderTime 21ms CodeModel.GetById 12ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

/src/Zend/Media/Flac/MetadataBlock/Application.php

http://php-reader.googlecode.com/
PHP | 77 lines | 19 code | 5 blank | 53 comment | 0 complexity | 9c570b9ece2254a1069fd16d2b1ece44 MD5 | raw file
 1<?php
 2/**
 3 * Zend Framework
 4 *
 5 * LICENSE
 6 *
 7 * This source file is subject to the new BSD license that is bundled
 8 * with this package in the file LICENSE.txt.
 9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
14 *
15 * @category   Zend
16 * @package    Zend_Media
17 * @subpackage FLAC
18 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
20 * @version    $Id: Application.php 241 2011-06-11 16:46:52Z svollbehr $
21 */
22
23/**#@+ @ignore */
24require_once 'Zend/Media/Flac/MetadataBlock.php';
25/**#@-*/
26
27/**
28 * This class represents the application metadata block. This block is for use by third-party applications. The only
29 * mandatory field is a 32-bit identifier. This ID is granted upon request to an application by the FLAC maintainers.
30 * The remainder is of the block is defined by the registered application. Visit the registration page if you would like
31 * to register an ID for your application with FLAC.
32 *
33 * Applications can be registered at {@link http://flac.sourceforge.net/id.html}.
34 *
35 * @category   Zend
36 * @package    Zend_Media
37 * @subpackage FLAC
38 * @author     Sven Vollbehr <sven@vollbehr.eu>
39 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
40 * @license    http://framework.zend.com/license/new-bsd     New BSD License
41 * @version    $Id: Application.php 241 2011-06-11 16:46:52Z svollbehr $
42 */
43final class Zend_Media_Flac_MetadataBlock_Application extends Zend_Media_Flac_MetadataBlock
44{
45    /**
46     * Constructs the class with given parameters and parses object related data.
47     *
48     * @param Zend_Io_Reader $reader The reader object.
49     */
50    public function __construct($reader)
51    {
52        parent::__construct($reader);
53
54        $this->_identifier = $this->_reader->readUInt32BE();
55        $this->_data = $this->_reader->read($this->getSize() - 4);
56    }
57    
58    /**
59     * Returns the application identifier.
60     *
61     * @return integer
62     */
63    public function getIdentifier()
64    {
65        return $this->_identifier;
66    }
67    
68    /**
69     * Returns the application data.
70     *
71     * @return string
72     */
73    public function getData()
74    {
75        return $this->_data;
76    }
77}