__construct (Constructor) [line 73]
Image_JpegXmpReader __construct(
string
$filename)
|
|
Creates a new JpegXmpReader object which will read from the specified file
Parameters:
getCreator [line 331]
boolean|string getCreator(
)
|
|
Retrieve creator field or fields as a single string
Returns a string consisting of all creator fields found in the XMP metadata. If more than one is present, they are joined by newlines. If there are no valid XMP metadata markers in the file, this function returns false.
If an unexpected condition occurs, such as failure to open the file or a file which is not a valid JPEG datastream, a Image_JpegMarkerReaderOpenException or Image_JpegMarkerReaderDamagedException will be thrown.
See also getCreators().
getCreators [line 307]
boolean|array getCreators(
)
|
|
Retrieve creator fields
Returns an array consisting of all creator fields found in the XMP metadata (most images only have one, so you may prefer to call getCreator()).
Returns false if no valid XMP metadata markers are present in the file.
If an unexpected condition occurs, such as failure to open the file or a file which is not a valid JPEG datastream, a Image_JpegMarkerReaderOpenException or Image_JpegMarkerReaderDamagedException will be thrown.
See also getCreator().
getDescription [line 233]
boolean|string getDescription(
)
|
|
Retrieve description field or fields as a single string
Returns a string consisting of all description fields found in the XMP metadata. If more than one is present, they are joined by newlines. If there are no valid XMP metadata markers in the file, this function returns false.
If an unexpected condition occurs, such as failure to open the file or a file which is not a valid JPEG datastream, a Image_JpegMarkerReaderOpenException or Image_JpegMarkerReaderDamagedException will be thrown.
See also getDescriptions().
getDescriptions [line 209]
boolean|array getDescriptions(
)
|
|
Retrieve description fields
Returns an array consisting of all description fields found in the XMP metadata (most images only have one, so you may prefer to call getTitle()).
Returns false if no valid XMP metadata markers are present in the file.
If an unexpected condition occurs, such as failure to open the file or a file which is not a valid JPEG datastream, a Image_JpegMarkerReaderOpenException or Image_JpegMarkerReaderDamagedException will be thrown.
See also getDescription().
getField [line 359]
boolean|array getField(
string
$field)
|
|
Retrieve all instances of a specified field
Returns an array consisting of all instances of a specified field found in the XMP metadata.
Returns false if no valid XMP metadata markers are present in the file.
Also returns false if the specified field is not present.
If an unexpected condition occurs, such as failure to open the file or a file which is not a valid JPEG datastream, a Image_JpegMarkerReaderOpenException or Image_JpegMarkerReaderDamagedException will be thrown.
See also getImplodedField().
Parameters:
getImplodedField [line 392]
boolean|string getImplodedField(
string
$field)
|
|
Retrieve all instances of a specified field as a single string
Returns a string consisting of all occurrences of the specified field found in the XMP metadata. If more than one is present, they are joined by newlines. If there are no valid XMP metadata markers in the file, this function returns false. This function also returns false if the specified field does not occur in the file.
If an unexpected condition occurs, such as failure to open the file or a file which is not a valid JPEG datastream, a Image_JpegMarkerReaderOpenException or Image_JpegMarkerReaderDamagedException will be thrown.
See also getCreators().
Parameters:
getSubject [line 282]
boolean|string getSubject(
)
|
|
Retrieve subject field or fields as a single string
Returns a string consisting of all subject fields found in the XMP metadata. If more than one is present, they are joined by newlines. If there are no valid XMP metadata markers in the file, this function returns false.
If an unexpected condition occurs, such as failure to open the file or a file which is not a valid JPEG datastream, a Image_JpegMarkerReaderOpenException or Image_JpegMarkerReaderDamagedException will be thrown.
See also getSubjects().
getSubjects [line 258]
boolean|array getSubjects(
)
|
|
Retrieve subject fields
Returns an array consisting of all subject fields found in the XMP metadata (most images only have one, so you may prefer to call getSubject()).
Returns false if no valid XMP metadata markers are present in the file.
If an unexpected condition occurs, such as failure to open the file or a file which is not a valid JPEG datastream, a Image_JpegMarkerReaderOpenException or Image_JpegMarkerReaderDamagedException will be thrown.
See also getSubject().
getTitle [line 184]
boolean|string getTitle(
)
|
|
Retrieve title field or fields as a single string
Returns a string consisting of all title fields found in the XMP metadata. If more than one is present, they are joined by newlines. If there are no valid XMP metadata markers in the file, this function returns false.
If an unexpected condition occurs, such as failure to open the file or a file which is not a valid JPEG datastream, a Image_JpegMarkerReaderOpenException or Image_JpegMarkerReaderDamagedException will be thrown.
See also getTitles().
getTitles [line 160]
boolean|array getTitles(
)
|
|
Retrieve title fields
Returns an array consisting of all title fields found in the XMP metadata (most images only have one, so you may prefer to call getTitle()).
Returns false if no valid XMP metadata markers are present in the file.
If an unexpected condition occurs, such as failure to open the file or a file which is not a valid JPEG datastream, a Image_JpegMarkerReaderOpenException or Image_JpegMarkerReaderDamagedException will be thrown.
See also getTitle().
readXmp [line 105]
boolean|SimpleXML readXmp(
)
|
|
Read the next (typically the only) XMP metadata marker in the file
On success, returns a SimpleXML object. You don't have to call this function directly if you are not interested in accessing the XML directly. Just call getTitle(), getDescription(), and so on, which automatically call readXmp if it has not already been called at least once. Calling this function yourself is also a good way to check whether a valid XMP metadata marker is present in the file at all.
If no XMP data is present, returns false (0.5.1, matches the behavior expected by getField). If an unexpected condition occurs, such as failure to open the file or a file which is not a valid JPEG datastream, a Image_JpegMarkerReaderOpenException or Image_JpegMarkerReaderDamagedException will be thrown.
Warning: XMP loves namespaces. This function registers the relevant namespaces as an aid to making successful queries against the XMP object, but var_dump may not report anything if called on the XMP object. That's normal. Again, for an easier interface, use the various "get" functions in this class.