source: extensions/AMetaData/JpegMetaData/Readers/SegmentReader.class.php @ 4698

Last change on this file since 4698 was 4698, checked in by grum, 14 years ago

[Plugin:AMetaData] Finished to comment the JpegMetaData classes and rename some methods

  • Property svn:executable set to *
File size: 3.0 KB
Line 
1<?php
2/*
3 * --:: JPEG MetaDatas ::-------------------------------------------------------
4 *
5 *  Author    : Grum
6 *   email    : grum at piwigo.org
7 *   website  : http://photos.grum.fr
8 *
9 *   << May the Little SpaceFrog be with you ! >>
10 *
11 *
12 * +-----------------------------------------------------------------------+
13 * | JpegMetaData - a PHP based Jpeg Metadata manager                      |
14 * +-----------------------------------------------------------------------+
15 * | Copyright(C) 2010  Grum - http://www.grum.fr                          |
16 * +-----------------------------------------------------------------------+
17 * | This program is free software; you can redistribute it and/or modify  |
18 * | it under the terms of the GNU General Public License as published by  |
19 * | the Free Software Foundation                                          |
20 * |                                                                       |
21 * | This program is distributed in the hope that it will be useful, but   |
22 * | WITHOUT ANY WARRANTY; without even the implied warranty of            |
23 * | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
24 * | General Public License for more details.                              |
25 * |                                                                       |
26 * | You should have received a copy of the GNU General Public License     |
27 * | along with this program; if not, write to the Free Software           |
28 * | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
29 * | USA.                                                                  |
30 * +-----------------------------------------------------------------------+
31 *
32 *
33 * -----------------------------------------------------------------------------
34 *
35 * The SegmentReader is a generic class providing methods to manage datas
36 * segments
37 *
38 * -----------------------------------------------------------------------------
39 *
40 * .. Notes ..
41 *
42 * This class is not declared as an abstract class, but it's not recommanded to
43 * create object with it.
44 *
45 *
46 * Derived classes :
47 *  - TiffReader        (for Tiff data block)
48 *
49 * This class provides theses public functions :
50 *  - getIsValid
51 *  - getIsLoaded
52 *
53 * -----------------------------------------------------------------------------
54 */
55
56  class SegmentReader
57  {
58    protected $data = null;
59    protected $isValid = false;
60    protected $isLoaded = false;
61
62    /**
63     * The constructor need the segment's datas
64     *
65     * @param Data $data : a Data object
66     */
67    function __construct(Data $data)
68    {
69      $this->data = $data;
70      $this->data->seek();
71    }
72
73    /**
74     * return true if the segment is valid
75     *
76     * @return Boolean
77     */
78    public function getIsValid()
79    {
80      return($this->isValid);
81    }
82
83    /**
84     * return true if the segment is loaded
85     *
86     * @return Boolean
87     */
88    public function getIsLoaded()
89    {
90      return($this->isLoaded);
91    }
92
93    public function toString()
94    {
95      $returned="";
96      return($returned);
97    }
98
99  }
100
101
102?>
Note: See TracBrowser for help on using the repository browser.