Definition at line 19 of file dmString.class.php.
| static dmString::camelCaseToUnderscore | ( | $ | str | ) | [static, final] |
| static dmString::getString | ( | $ | key, | |
| $ | lang = 'en' | |||
| ) | [static, final] |
| string | key | |
| string | lang Two-letter language code |
Definition at line 447 of file dmString.class.php.
Referenced by dmUnavailableObjectException::__construct(), dmUnavailableCollectionException::__construct(), dmRating::__construct(), dmInvalidRouteException::__construct(), dmInvalidEmailException::__construct(), dmHTTPException::__construct(), dmCdmUser::authenticate(), dmQuery::getSearchResults(), dmRating::setMax(), dmQueryTerm::setMode(), dmFeedOutput::setMode(), dmObject::setPtr(), dmTag::setValue(), dmRating::setValue(), and dmInput::validate().
| static dmString::highlight | ( | $ | term, | |
| $ | str, | |||
| $ | class = 'dmHighlightedTerm' | |||
| ) | [static, final] |
"Highlights" all occurrences of $term in $str by enclosing them in <span> elements with class $class.
| string | term | |
| string | str | |
| string | class |
Definition at line 380 of file dmString.class.php.
Referenced by ObjectDraw::highlightedFullText(), and ObjectResultsDraw::results().
| static dmString::hyperlink | ( | $ | str, | |
| DOMDocument $ | dxml = null | |||
| ) | [static] |
Searches through text strings and adds HTML anchor tags around any words beginning with http://, https://, ftp://, or gopher://.
| string | str | |
| DOMDocument | dxml |
Definition at line 406 of file dmString.class.php.
Referenced by ObjectDraw::metadataAsDL().
| static dmString::isValidHostname | ( | $ | str | ) | [static, final] |
Adapted from EmailAddressValidator::check_domain_portion() by Dave Child.
Supposedly RFC2822-compliant.
| string | str |
Definition at line 480 of file dmString.class.php.
Referenced by dmEmailMessage::isValidEmail().
| static dmString::isValidIPv4Address | ( | $ | str, | |
| $ | allow_ranges = false | |||
| ) | [static, final] |
| string | str | |
| Boolean | allow_ranges |
Definition at line 519 of file dmString.class.php.
| static dmString::isValidPathname | ( | $ | str, | |
| $ | check_exists = false | |||
| ) | [static, final] |
| string | str | |
| Boolean | check_exists |
Definition at line 539 of file dmString.class.php.
| static dmString::paranoid | ( | $ | str, | |
| $ | allowed = array() | |||
| ) | [static, final] |
Strips all non-alphanumerics from a string, optionally sparing any characters in the $allowed array.
This should be an indexed array with one character per element. This method inspired by and partially stolen from CakePHP's paranoid().
| string | str | |
| array | allowed Array of characters that will be retained in the string |
Definition at line 361 of file dmString.class.php.
Referenced by ResultsDraw::facetsAsUL(), dmTemplateSet::getPath(), ObjectDraw::highlightedFullText(), and isValidPathname().
| static dmString::truncate | ( | $ | str, | |
| $ | max_words | |||
| ) | [static, final] |
Truncates a text string to the desired word length, appending an ellipsis (.
..) at the end.
| string | str | |
| int | max_words |
Definition at line 462 of file dmString.class.php.
Referenced by ResultsDraw::resultsAsGrid(), ResultsDraw::resultsAsList(), and ResultsDraw::resultsAsTiles().
| static dmString::underscoreToCamelCase | ( | $ | str, | |
| $ | capitalize_first_char = false | |||
| ) | [static, final] |
| string | str | |
| Boolean | capitalize_first_char |
Definition at line 557 of file dmString.class.php.
Referenced by dmRoute::setMethod().
| static dmString::websafe | ( | $ | str | ) | [static, final] |
Strips all HTML tags from a string and HTML-escapes it.
Use this where absolutely no HTML should be allowed (i.e. most places). The page encoding must be UTF-8 for this method to work properly - otherwise, you may be open to cross-site scripting attacks.
| string | str |
Definition at line 582 of file dmString.class.php.
Referenced by ObjectDraw::addFavoriteButton(), ObjectDraw::childLinksAsList(), ObjectDraw::childLinksAsPulldown(), Draw::collectionsAsPulldown(), ObjectDraw::commentsSection(), ObjectDraw::compoundObjectPageNumbersInSearchResultsAsString(), ObjectDraw::compoundObjectSearchForm(), ObjectDraw::compoundPageFlipLinks(), Draw::downloadImageLink(), Draw::exception(), ResultsDraw::facetsAsUL(), SearchDraw::fieldSearch(), Draw::flash(), Draw::formattedFlash(), dmQuickTimeViewer::getHTMLTag(), dmGenericPDFViewer::getHTMLTag(), dmGenericObjectViewer::getHTMLTag(), dmGenericImageViewer::getHTMLTag(), dmFileLinkViewer::getHTMLTag(), ObjectDraw::highlightedFullText(), Draw::loginPageLink(), ObjectDraw::metadataAsDL(), ObjectDraw::metadataAsMetaTags(), ResultsDraw::pageLinks(), ObjectDraw::previousNextLinks(), SearchDraw::proximitySearch(), ObjectDraw::ratingsSection(), ObjectResultsDraw::results(), ResultsDraw::resultsAsGrid(), ResultsDraw::resultsAsList(), ResultsDraw::resultsAsTiles(), ObjectDraw::resultsAsUL(), ResultsDraw::searchTerms(), dmEmailMessage::setSenderName(), ResultsDraw::sortLinksAsUL(), ObjectDraw::taggingSection(), Draw::tagsAsCloud(), Draw::vocabularyAsCloud(), Draw::vocabularyAsList(), and Draw::vocabularyForSelect().
| static dmString::xmlentities | ( | $ | str | ) | [static, final] |
| string | str |
Definition at line 591 of file dmString.class.php.
Referenced by dmConfig::getReferenceURLTemplateSetForCollection(), ResultsDraw::sortLinksAsUL(), dmRSSOutput::transformObject(), dmRDFXMLOutput::transformObject(), dmAtomOutput::transformObject(), dmRSSOutput::transformResults(), and dmAtomOutput::transformResults().
1.6.1