dmObject Class Reference

Inheritance diagram for dmObject:
dmModel dmFavorite

Public Member Functions

Static Public Member Functions

Protected Member Functions

Protected Attributes


Detailed Description

Definition at line 17 of file dmObject.class.php.


Constructor & Destructor Documentation

dmObject::__construct ( dmCollection collection,
ptr 
)
Parameters:
dmCollection collection
int ptr
Since:
0.1

Definition at line 199 of file dmObject.class.php.


Member Function Documentation

dmObject::__toString (  ) 
Returns:
string The DC title of the dmObject (if available), or "alias pointer" if not.
Since:
0.1

Definition at line 210 of file dmObject.class.php.

dmObject::addComment ( dmComment c  )  [final]

Associates a dmComment with the object and saves it to the server.

Parameters:
dmComment c
Exceptions:
dmHTTPException 
Returns:
void

Definition at line 313 of file dmObject.class.php.

static dmObject::addCurrent ( dmObject obj  )  [static, final]

Adds a current object in a multiple-object context (such as results view).

Parameters:
dmObject obj
Since:
0.4

Definition at line 125 of file dmObject.class.php.

dmObject::addRating ( dmRating r  ) 

Associates a dmRating with the object and saves it to the server.

Parameters:
dmRating r
Exceptions:
dmHTTPException 
Returns:
void
Since:
0.1

Definition at line 755 of file dmObject.class.php.

dmObject::addTag ( dmTag tag  ) 

Associates a dmTag with the object and saves it to the server.

Parameters:
dmTag tag
Exceptions:
dmHTTPException 
Returns:
void

Definition at line 830 of file dmObject.class.php.

dmObject::getAlias (  )  [final]

Convenience method that returns the alias of the object's parent collection.

Equivalent to calling getCollection->getAlias().

Returns:
string
Since:
0.1
See also:
dmCollection::getAlias()

Definition at line 229 of file dmObject.class.php.

Referenced by addComment(), dmSession::addHasRated(), addRating(), addTag(), getImageURL(), getRecordURL(), getReferenceURL(), dmSession::hasCommentedOnObject(), dmSession::hasRatedObject(), and dmFavorite::save().

static dmObject::getAllCurrent (  )  [static, final]

Returns the object relevant to the current routed view, if in a multiple-object context.

Otherwise, returns an empty array. Use dmObject::getCurrent() in a single-object context.

Returns:
Array of dmObject objects, or an empty array if none exist
Since:
0.4

Definition at line 81 of file dmObject.class.php.

Referenced by ResultsDraw::resultsAsGrid(), ResultsDraw::resultsAsList(), and ResultsDraw::resultsAsTiles().

dmObject::getChild ( index  )  [final]

Returns the dmObject corresponding to array index $index, or false if none exists.

$index is zero-based, so page 1 corresponds to index 0.

Parameters:
int index
Returns:
dmObject or null if nonexistent
Since:
0.1
See also:
dmObject::getChildren()

Definition at line 242 of file dmObject.class.php.

Referenced by getFullText().

dmObject::getChildren (  )  [final]
Returns:
Array of all of the object's children in page order, or an empty array if none exist
See also:
dmObject::getChild()
Since:
0.1

Definition at line 272 of file dmObject.class.php.

Referenced by dmSession::addHasCommented(), and hasFullText().

dmObject::getCollection (  )  [final]
dmObject::getComments (  ) 

Retrieves the dmObject's approved comments from the data store.

Returns:
array Array of dmComment objects, or empty array if none
Since:
0.1

Definition at line 333 of file dmObject.class.php.

dmObject::getCreated (  )  [final]

Retrieves the dmObject's "dmcreated" value from CONTENTdm(R).

Returns:
dmDateTime object
Since:
0.1

Definition at line 370 of file dmObject.class.php.

static dmObject::getCurrent (  )  [static, final]
dmObject::getField ( nick = null  )  [final]

An alias of dmObject::getMetadata().

If $nick is supplied and a valid field nickname, returns a dmField object corresponding to the field. If it is supplied but not valid, returns false. If it is not supplied, returns an array of all of the dmObject's fields, as dmField objects.

Parameters:
string nick
Returns:
dmField|false|array
See also:
dmObject::getMetadata()
Since:
0.3

Definition at line 407 of file dmObject.class.php.

dmObject::getFields (  )  [final]

An alias of dmObject::getMetadata().

Returns:
array An array of all of the dmObject's fields as dmField objects
See also:
dmObject::getMetadata()
Since:
0.3

Definition at line 418 of file dmObject.class.php.

Referenced by dmRDFXMLOutput::transformObject().

dmObject::getFilename (  ) 
Returns:
string The filename of the dmObject, without any path information
Since:
0.1

Definition at line 426 of file dmObject.class.php.

dmObject::getFileURL (  ) 

Returns the URL to the object's file.

Returns:
string
Since:
0.1

Definition at line 447 of file dmObject.class.php.

dmObject::getFullText (  )  [final]

Returns the dmField object corresponding to the object's fulltext field (with nick "full").

If the dmObject is a compound object, returns the fulltext field corresponding to the first page. To avoid this behavior, use dmObject::getMetadata('full').

Returns:
dmField object, or false if not available
See also:
dmObject::getMetadata()
Since:
0.1

Definition at line 465 of file dmObject.class.php.

Referenced by hasFullText().

dmObject::getHeight (  )  [final]
Returns:
The height of the dmObject's image, if applicable.
Since:
0.1

Definition at line 512 of file dmObject.class.php.

Referenced by getImageURL().

static dmObject::getHighlighted (  )  [static, final]

Retrieves the current highlighted object.

Exceptions:
dmHTTPException 
dmUnavailableCollectionException 
dmUnavailableObjectException 
Returns:
A dmObject object, or null if none exists.
Since:
0.1

Definition at line 149 of file dmObject.class.php.

Referenced by isHighlighted().

dmObject::getImageURL ( maxwidth,
maxheight,
x = 0,
y = 0,
rotate = 0 
)
Parameters:
int maxwidth
int maxheight
int x X offset
int y Y offset
int rotate 0-360
Returns:
A relative URL to the Object's image with dimensions and orientation corresponding to the supplied parameters, or false if the height/width of the image are 0 (such as would be the case if it did not have one).
Since:
0.1

Definition at line 557 of file dmObject.class.php.

Referenced by Draw::downloadImageLink().

dmObject::getLastUpdated (  ) 

Retrieves the dmObject's "dmmodified" value from CONTENTdm(R).

Returns:
dmDateTime object
Since:
0.1

Definition at line 607 of file dmObject.class.php.

Referenced by dmRSSOutput::transformObject(), and dmAtomOutput::transformObject().

dmObject::getMetadata ( nick = null  )  [final]

If $nick is supplied and a valid field nickname, returns a dmField object corresponding to the field.

If it is supplied but not valid, returns false. If it is not supplied, returns an array of all of the dmObject's fields, as dmField objects.

Parameters:
string nick
Returns:
dmField|false|array
See also:
dmObject::getField()
Since:
0.1

Definition at line 635 of file dmObject.class.php.

Referenced by __toString(), getField(), getFields(), getFullText(), dmRSSOutput::transformObject(), and dmAtomOutput::transformObject().

dmObject::getNumChildren (  )  [final]
Returns:
int
Since:
1.0RC2

Definition at line 652 of file dmObject.class.php.

dmObject::getNumComments (  ) 

Retrieves the number of approved comments for the dmObject.

Returns:
int
Since:
0.1

Definition at line 668 of file dmObject.class.php.

Referenced by hasComments().

dmObject::getNumRatings (  ) 
Returns:
int
Since:
0.1

Definition at line 678 of file dmObject.class.php.

Referenced by hasBeenRated().

dmObject::getPage (  )  [final]
Returns:
int
Since:
0.1

Definition at line 689 of file dmObject.class.php.

dmObject::getParent (  )  [final]
Returns:
dmObject, or null if no parent exists
Since:
0.1

Definition at line 701 of file dmObject.class.php.

Referenced by dmSession::addHasCommented(), and isChild().

dmObject::getPtr (  )  [final]
static dmObject::getRandom (  )  [static, final]

Retrieves a random object.

Exceptions:
dmHTTPException 
dmUnavailableCollectionException 
dmUnavailableObjectException 
Returns:
dmObject A random dmObject, or null if none exists.
Since:
0.1

Definition at line 176 of file dmObject.class.php.

dmObject::getRating ( out_of = 100  )  [final]
Parameters:
int out_of Fractional denominator
Returns:
float
See also:
dmObject::hasBeenRated()
Since:
0.1

Definition at line 776 of file dmObject.class.php.

dmObject::getRecordURL ( representation = null  ) 

Retrieves the URI of the object in the current dmBridge template set.

Using dmChildObject::getReferenceURL() instead is preferred.

If dmBridge is being used in a context in which there is no current template set, supply $dir_prefix to tell this method the path to the template engine root. If there is no current template set and $dir_prefix is not supplied, will return false.

Parameters:
string representation Output format representation (one of 'atom', 'rss', 'rdf', or null for HTML template
Returns:
[string|false]
Since:
0.1

Definition at line 800 of file dmObject.class.php.

Referenced by dmObjectView::getNextObjectURL(), dmObjectView::getPreviousObjectURL(), dmRSSOutput::transformObject(), and dmAtomOutput::transformObject().

dmObject::getReferenceURL (  ) 
Returns:
string The dmObject's absolute reference URL.
See also:
dmObject::getRecordURL()
Since:
0.1

Definition at line 812 of file dmObject.class.php.

Referenced by dmRSSOutput::transformObject(), and dmAtomOutput::transformObject().

dmObject::getTags (  ) 

Retrieves the dmObject's approved tags.

Returns:
array Array of dmTag objects, or empty array if none

Definition at line 850 of file dmObject.class.php.

dmObject::getThumbnailURL (  ) 

Alias of getThumbURL().

Returns:
string
See also:
dmObject::getThumbURL()

Definition at line 882 of file dmObject.class.php.

dmObject::getThumbURL (  ) 
Returns:
string The absolute URL of the dmObject's thumbnail image.

Definition at line 868 of file dmObject.class.php.

Referenced by getThumbnailURL(), dmRSSOutput::transformObject(), and dmAtomOutput::transformObject().

dmObject::getTitle (  )  [final]
Returns:
string The dmObject's page title (if a compound object page), which may be different from the DC metadata title returned by getField() or getMetadata(). Returns null if the dmObject is not a compound object page.

Definition at line 892 of file dmObject.class.php.

dmObject::getWidth (  ) 
Returns:
int The width of the dmChildObject's image, if applicable.

Definition at line 903 of file dmObject.class.php.

Referenced by getImageURL().

dmObject::hasBeenRated (  )  [final]
Returns:
Boolean
See also:
dmObject::getRating()
Since:
0.1

Definition at line 743 of file dmObject.class.php.

dmObject::hasChildren (  ) 
Returns:
Boolean True if the object is a compound object and has at least one page.
Since:
0.1
See also:
dmObject::isCompound()

Definition at line 291 of file dmObject.class.php.

Referenced by getFullText(), and hasFullText().

dmObject::hasComments (  ) 
Returns:
Boolean True if the object has at least one approved comment, or false if not
Since:
0.4

Definition at line 349 of file dmObject.class.php.

dmObject::hasFullText (  )  [final]
Returns:
Boolean
Since:
0.1

Definition at line 485 of file dmObject.class.php.

static dmObject::instantiate ( dmCollection c,
ptr 
) [static]

A static constructor, preferred over __construct() ("new dmObject...") as it will utilize the built-in object cache (faster).

Parameters:
dmCollection c
int ptr
Exceptions:
dmUnavailableObjectException 
Returns:
dmObject
Since:
0.3
Deprecated:
To be replaced by a factory class

Reimplemented in dmFavorite.

Definition at line 62 of file dmObject.class.php.

Referenced by getChild(), getChildren(), getHighlighted(), dmComment::getObject(), getParent(), getRandom(), and dmQuery::getSearchResults().

dmObject::isChild (  ) 
Returns:
Boolean True if the object is a child of another object; i.e. if it is a compound object page.

Definition at line 262 of file dmObject.class.php.

Referenced by dmSession::addHasCommented().

dmObject::isCompound (  ) 
Returns:
Boolean
Since:
0.1

Definition at line 357 of file dmObject.class.php.

Referenced by dmSession::addHasCommented().

dmObject::isFavorite (  )  [final]

Checks whether the dmObject is in the user's dmCart instance.

Returns:
Boolean
Since:
0.1

Definition at line 386 of file dmObject.class.php.

dmObject::isHighlighted (  )  [final]

Returns true if the dmObject is the current highlighted object.

Will return false if the dmObject is in the highlighted object schedule but not the current highlighted object.

Returns:
Boolean
Since:
0.3

Definition at line 535 of file dmObject.class.php.

static dmObject::setCurrent ( dmObject obj  )  [static, final]

Adds a current object in a single-object context (such as object view).

Parameters:
dmObject obj
Since:
0.4

Definition at line 136 of file dmObject.class.php.

dmObject::setFilename ( filename  )  [final, protected]
Parameters:
string filename
Since:
0.1

Definition at line 437 of file dmObject.class.php.

dmObject::setHeight ( int  )  [final, protected]
Parameters:
int int
Since:
0.1

Definition at line 523 of file dmObject.class.php.

dmObject::setLastUpdated ( dmDateTime date  )  [protected]
Parameters:
dmDateTime date

Definition at line 620 of file dmObject.class.php.

Referenced by getLastUpdated().

dmObject::setPtr ( ptr  )  [final, protected]
Parameters:
int ptr
Exceptions:
dmIllegalArgumentException 
Since:
0.1

Definition at line 730 of file dmObject.class.php.

Referenced by __construct().

dmObject::setWidth ( int  )  [final, protected]
Parameters:
int int

Definition at line 913 of file dmObject.class.php.


The documentation for this class was generated from the following file:

Generated on Fri Aug 20 13:16:50 2010 for dmBridge PHP API by  doxygen 1.6.1