dmBridge PHP API
DMInternalURI Class Reference
Inheritance diagram for DMInternalURI:

Public Member Functions

Static Public Member Functions


Detailed Description

Subclass of DMURI that represents intra-dmBridge URIs.

This class enables accessing the dmBridge "params," which are a subset of the "path" portion of the URI beginning at the base URI and ending at the path extension. Given the following URI as an example:

http://www.bla.com/dm/objects/bla/59.atom

The dmBridge URI namespace begins beneath "/dm/", and the "params," therefore, are "objects/bla/59."

Author:
Alex Dolski <alex.dolski@unlv.edu> http://www.opensource.org/licenses/mit-license.php

Definition at line 24 of file DMInternalURI.php.


Member Function Documentation

DMInternalURI::getAbsoluteURIAsString ( )
Returns:
string The string representation of the URI, or null if the URI is invalid.

Reimplemented from DMURI.

Definition at line 220 of file DMInternalURI.php.

DMInternalURI::getExtension ( )
Returns:
string

Definition at line 266 of file DMInternalURI.php.

DMInternalURI::getParamComponents ( )
Returns:
array The slash-delineated components of the params, as an array.

Definition at line 324 of file DMInternalURI.php.

Referenced by getRoute(), getVersion(), isControlPanel(), isHTTPAPI(), and isTemplateEngine().

DMInternalURI::getParams ( )
Returns:
string The "params" portion of the URI; e.g. "api/1/collections" or "objects/alias/123".

Definition at line 306 of file DMInternalURI.php.

Referenced by getParamComponents(), and getRoute().

static DMInternalURI::getResourceURI ( component,
params,
representation = null 
) [static]

Returns the RESTful URI of a dmBridge model object.

Parameters:
intcomponent The component for which the URI should be generated (one of the constants in the DMBridgeComponent class)
stringparams The URI params
stringrepresentation Optional alternate representation such as "atom"; default is HTML
Returns:
DMInternalURI

Definition at line 71 of file DMInternalURI.php.

Referenced by DMTag::getURI(), DMObject::getURI(), DMComment::getURI(), and DMCollection::getURI().

DMInternalURI::getRoute ( )
Parameters:
DMInternalURIuri
Returns:
DMRoute

Definition at line 332 of file DMInternalURI.php.

static DMInternalURI::getURIWithParams ( params,
array $  query = array(),
representation = null 
) [static]
Parameters:
stringparams
arrayquery Array of query string key-value pairs in the format accepted by http_build_query()
stringrepresentation An optional representation extension to append to the URL (e.g. "atom"). Pass null to use the current representation, or false to not explicitly specify a representation in the URI.
Returns:
DMInternalURI

Definition at line 196 of file DMInternalURI.php.

Referenced by DMObject::getCommentsFeedURL(), UNLVSpatial::getControlPanelMenuSections(), UNLVRandom::getControlPanelMenuSections(), UNLVHighlight::getControlPanelMenuSections(), DMObject::getFileURL(), DMObjectTemplateHelper::getHtmlAddFavoriteButton(), DMObjectTemplateHelper::getHtmlCompoundObjectSearchForm(), DMSearchTemplateHelper::getHtmlDateSearch(), DMSearchTemplateHelper::getHtmlFieldSearch(), UNLVSpatialTemplateHelper::getHtmlGoogleMapsSpatialSearch(), DMGenericTemplateHelper::getHtmlLoginForm(), DMControlPanelTemplateHelper::getHtmlMainMenu(), DMObjectTemplateHelper::getHtmlMetadataAsDL(), DMSearchTemplateHelper::getHtmlProximitySearch(), DMResultsTemplateHelper::getHtmlSortLinksAsUL(), DMPaginatedPDFViewer::getHTMLTag(), DMGenericTemplateHelper::getHtmlTagsAsCloud(), DMGenericTemplateHelper::getHtmlVocabularyAsCloud(), DMTemplateEngineView::getLogoutURI(), getResourceURI(), DMResultsTemplateHelper::getResultsForm(), DMFavoritesTemplateHelper::getResultsForm(), DMObject::getThumbnailURL(), UNLVSpatialQuery::getURI(), DMTagQuery::getURI(), DMSearchView::getURI(), DMObjectResultsView::getURI(), DMObjectQuery::getURI(), DMLoginView::getURI(), DMFavoritesView::getURI(), DMControlPanelView::getURI(), DMCommentQuery::getURI(), DMMailer::sendNotificationOfNewComment(), DMXMLRepresentationTransformerV1::transformException(), DMJSONRepresentationTransformerV1::transformException(), and DMTESitemapController::view().

DMInternalURI::getVersion ( )
Returns:
int The version of the resource specified by the URI params, typically the second part of the params; e.g. "api/1/collections". Not all URIs will have a version, in which case this method will return null.

Definition at line 432 of file DMInternalURI.php.

DMInternalURI::isControlPanel ( )
Returns:
boolean True if the URI points to the Control Panel.

Definition at line 258 of file DMInternalURI.php.

DMInternalURI::isHTTPAPI ( )
Returns:
boolean True if the URI points to the HTTP API.

Definition at line 280 of file DMInternalURI.php.

DMInternalURI::isTemplateEngine ( )
Returns:
boolean True if the URI points to the template engine.

Definition at line 421 of file DMInternalURI.php.

DMInternalURI::setExtension ( ext)
Parameters:
stringext

Definition at line 273 of file DMInternalURI.php.

Referenced by setString().

DMInternalURI::setParams ( params)
Parameters:
stringparams

Definition at line 315 of file DMInternalURI.php.

DMInternalURI::setString ( str)

Parameters:
stringstr
Exceptions:
DMIllegalArgumentExceptionif $str is not a valid URI

Reimplemented from DMURI.

Definition at line 368 of file DMInternalURI.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables