[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/gallery/data/ -> galleryresourcebasemetadatareader.class.php (sommaire)

(pas de description)

Poids: 67 lignes (2 kb)
Inclus ou requis:0 fois
Référencé: 1 fois
Nécessite: 0 fichiers

Définit 1 class

GalleryResourceBaseMetadataReader:: (6 méthodes):
  GalleryResourceBaseMetadataReader()
  getMD5File()
  getMD5Data()
  getFileSize()
  getFileFormat()
  getRoundedSize()


Classe: GalleryResourceBaseMetadataReader  - X-Ref

\ingroup Gallery

acts as some kind of decorator adding getter methods for getting
some information straight from the metadata field of the resource object,
without having to overload the basic GalleryResource object with thousands
of accessor methods for every single property we might need.

Using this method, we can have a ImageMetadataReader which would provide
methods like getHeight, getWidth, getBpp etc, and another SoundMetadataReader
with methods like getFrequency, etc.

The right way to use this class is:
<pre>
$reader = $resource->getResourceMetadataReader();
if( $resource->isImage()) {
print( "image size: ".$reader->getHeight()."x".$reader->getWidth()." pixels" );
}
</pre>

The method GalleryResource::getResourceMetadataReader() will return the right
metadata reader class so that we can check the properties of the file. We can either query
the methods GalleryResource::isImage(), GalleryResource::isVideo(), etc to know which properties
we can check, or use PHP's function for checking of which type a class is.
GalleryResourceBaseMetadataReader( $resource )   X-Ref
Pas de description

getMD5File()   X-Ref
Pas de description

getMD5Data()   X-Ref
Pas de description

getFileSize()   X-Ref
Pas de description

getFileFormat()   X-Ref
Pas de description

getRoundedSize()   X-Ref
Pas de description



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics