Public Member Functions | |
| code2utf ($num) | |
| cp1252ToEntities ($str) | |
| encode_mime_header ($string) | |
| fputcsv (&$handle, $fields=array(), $delimiter= ',', $enclosure= '"') | |
| getHTMLEntities () | |
| hasMBString () | |
| hasPCREUTF8 () | |
| html2ascii ($str) | |
| html2utf ($str) | |
| init () | |
| isUTF8 ($str) | |
| mail ($to, $subject, $message, $additional_headers= '', $additional_parameters= '') | |
| mime_content_type ($filename) | |
| regexp_grep ($pattern, $input) | |
| regexp_match ($pattern, $subject) | |
| regexp_match_all ($pattern, $subject, &$matches) | |
| regexp_match_get ($pattern, $subject, &$matches) | |
| regexp_quote ($string, $delimiter= '/') | |
| regexp_replace ($pattern, $replacement, $subject, $limit=-1) | |
| regexp_replace_callback ($pattern, $callback, $subject, $limit=-1) | |
| regexp_split ($pattern, $subject, $limit=-1) | |
| stripUnsafeHtml ($input) | |
| strlen ($string) | |
| strpos ($haystack, $needle, $offset=0) | |
| strrpos ($haystack, $needle) | |
| strtolower ($string) | |
| strtoupper ($string) | |
| substr ($string, $start, $length=null) | |
| substr_count ($haystack, $needle) | |
| utf2html ($str) | |
| utf8Clean ($str) | |
Definition at line 18 of file String.inc.php.
| String.code2utf | ( | $ | num | ) |
Returns the UTF-8 string corresponding to the unicode value Does not require any multibyte PHP libraries (from php.net, courtesy - romans@void.lv)
| $num | int |
Definition at line 416 of file String.inc.php.
| String.cp1252ToEntities | ( | $ | str | ) |
Convert Windows CP-1252 numeric entities in a string to named HTML entities This is a helper function for transcoding into HTML/XML
| $input | string input string |
Definition at line 588 of file String.inc.php.
| String.encode_mime_header | ( | $ | string | ) |
| String.fputcsv | ( | &$ | handle, | |
| $ | fields = array(), |
|||
| $ | delimiter = ',', |
|||
| $ | enclosure = '"' | |||
| ) |
Wrapper around fputcsv for systems that may or may not support it (i.e. PHP < 5.1.0); see PHP documentation for fputcsv.
Definition at line 721 of file String.inc.php.
References strlen(), strpos(), and substr().
Referenced by ArticleReportPlugin.display().
| String.getHTMLEntities | ( | ) |
Return an associative array of named->numeric HTML entities Required to support HTML functions without objects in PHP4/PHP5 From php.net: function.get-html-translation-table.php
Definition at line 624 of file String.inc.php.
Referenced by html2utf().
| String.hasMBString | ( | ) |
Check if server has the mbstring library. Currently requires PHP >= 4.3.0 (for mb_strtolower, mb_strtoupper, and mb_substr_count)
Definition at line 56 of file String.inc.php.
Referenced by InstallForm.display(), and init().
| String.hasPCREUTF8 | ( | ) |
Check if server supports the PCRE_UTF8 modifier.
Definition at line 73 of file String.inc.php.
Referenced by init().
| String.html2ascii | ( | $ | str | ) |
Convert UTF-8 numeric entities in a string to ASCII values This is a helper function for transcoding into HTML/XML
| $str | string input string |
Definition at line 491 of file String.inc.php.
Referenced by Transcoder.trans().
| String.html2utf | ( | $ | str | ) |
Convert numeric HTML entities in a string to UTF-8 encoded characters This is a native alternative to the buggy html_entity_decode() using UTF8
| $str | string input string |
Definition at line 474 of file String.inc.php.
References getHTMLEntities(), and regexp_replace().
Referenced by SearchHTMLParser.doRead(), and Transcoder.trans().
| String.init | ( | ) |
Perform initialization required for the string wrapper library.
Definition at line 22 of file String.inc.php.
References Config.getVar(), hasMBString(), hasPCREUTF8(), and strtolower().
| String.isUTF8 | ( | $ | str | ) |
Detect whether a string contains non-ascii multibyte sequences in the UTF-8 range Does not require any multibyte PHP libraries
| $input | string input string |
Definition at line 365 of file String.inc.php.
Referenced by Core.cleanVar().
| String.mail | ( | $ | to, | |
| $ | subject, | |||
| $ | message, | |||
| $ | additional_headers = '', |
|||
| $ | additional_parameters = '' | |||
| ) |
| String.mime_content_type | ( | $ | filename | ) |
Definition at line 273 of file String.inc.php.
References Config.getVar(), strpos(), and substr().
Referenced by Mail.addAttachment(), ImportOJS1.copyHTMLGalleyImages(), FileManager.downloadFile(), and FileManager.getUploadedFileType().
| String.regexp_grep | ( | $ | pattern, | |
| $ | input | |||
| ) |
| String.regexp_match | ( | $ | pattern, | |
| $ | subject | |||
| ) |
Definition at line 218 of file String.inc.php.
References utf8Clean().
Referenced by Request.isBot(), and FormValidatorRegExp.isValid().
| String.regexp_match_all | ( | $ | pattern, | |
| $ | subject, | |||
| &$ | matches | |||
| ) |
Definition at line 237 of file String.inc.php.
References utf8Clean().
Referenced by RTHandler.getParameterNames(), Locale.getParameterNames(), and SQLParser.parseStatements().
| String.regexp_match_get | ( | $ | pattern, | |
| $ | subject, | |||
| &$ | matches | |||
| ) |
Definition at line 227 of file String.inc.php.
References utf8Clean().
Referenced by ResolverPlugin.fetch(), PeopleHandler.mergeUsers(), AdminPeopleHandler.mergeUsers(), and PeopleHandler.people().
| String.regexp_quote | ( | $ | string, | |
| $ | delimiter = '/' | |||
| ) |
Definition at line 202 of file String.inc.php.
| String.regexp_replace | ( | $ | pattern, | |
| $ | replacement, | |||
| $ | subject, | |||
| $ | limit = -1 | |||
| ) |
Definition at line 246 of file String.inc.php.
References utf8Clean().
Referenced by Core.cleanFileVar(), ArticleSearchIndex.filterKeywords(), UserXMLParser.generateUsername(), html2utf(), HelpHandler.search(), Mail.send(), SQLParser.stripComments(), Validation.suggestUsername(), and HelpHandler.view().
| String.regexp_replace_callback | ( | $ | pattern, | |
| $ | callback, | |||
| $ | subject, | |||
| $ | limit = -1 | |||
| ) |
Definition at line 255 of file String.inc.php.
References utf8Clean().
Referenced by ArticleXMLGalley.getHTMLContents(), and ArticleHTMLGalley.getHTMLContents().
| String.regexp_split | ( | $ | pattern, | |
| $ | subject, | |||
| $ | limit = -1 | |||
| ) |
Definition at line 264 of file String.inc.php.
References utf8Clean().
Referenced by ArticleSearchIndex.filterKeywords().
| String.stripUnsafeHtml | ( | $ | input | ) |
Strip unsafe HTML from the input text. Covers XSS attacks like scripts, onclick(...) attributes, javascript: urls, and special characters.
| $input | string input string |
Definition at line 303 of file String.inc.php.
References Config.getVar().
| String.strlen | ( | $ | string | ) |
Definition at line 91 of file String.inc.php.
Referenced by Locale.checkLengths(), ArticleSearchIndex.filterKeywords(), fputcsv(), FormValidatorLength.isValid(), FileManager.truncateFileName(), utf2html(), and utf8Clean().
| String.strpos | ( | $ | haystack, | |
| $ | needle, | |||
| $ | offset = 0 | |||
| ) |
| String.strrpos | ( | $ | haystack, | |
| $ | needle | |||
| ) |
Definition at line 113 of file String.inc.php.
| String.strtolower | ( | $ | string | ) |
Definition at line 140 of file String.inc.php.
Referenced by ArticleSearch._parseQuery(), ArticleSearchIndex.filterKeywords(), AuthorDAO.getAuthorsAlphabetizedByJournal(), HelpTopicDAO.getTopicsByKeyword(), init(), HelpTopicDAO.scanTopic(), strtoupper(), and Validation.suggestUsername().
| String.strtoupper | ( | $ | string | ) |
Definition at line 151 of file String.inc.php.
References strtolower().
Referenced by GroupHandler.addMembership(), EditorHandler.assignEditor(), SubmissionEditHandler.assignLayoutEditor(), SubmissionEditHandler.enrollSearch(), PeopleHandler.enrollSearch(), PeopleHandler.mergeUsers(), AdminPeopleHandler.mergeUsers(), PeopleHandler.people(), SubmissionEditHandler.selectProofreader(), SubscriptionManagerHandler.selectSubscriber(), and SubscriptionHandler.selectSubscriber().
| String.substr | ( | $ | string, | |
| $ | start, | |||
| $ | length = null | |||
| ) |
Definition at line 124 of file String.inc.php.
Referenced by TinyMCEPlugin.callback(), PayPalPlugin.displayPaymentForm(), RegistrationForm.execute(), AuthorSubmitStep1Form.execute(), ArticleSearchIndex.filterKeywords(), fputcsv(), DOAJExportDom.generateArticleDom(), mime_content_type(), Validation.suggestUsername(), FileManager.truncateFileName(), utf2html(), and utf8Clean().
| String.substr_count | ( | $ | haystack, | |
| $ | needle | |||
| ) |
Definition at line 162 of file String.inc.php.
Referenced by SQLParser.parseStatements(), and HelpTopicDAO.scanTopic().
| String.utf2html | ( | $ | str | ) |
Convert UTF-8 encoded characters in a string to escaped HTML entities This is a helper function for transcoding into HTML
| $input | string input string |
Definition at line 430 of file String.inc.php.
References strlen(), and substr().
Referenced by ArticleXMLGalley.getHTMLContents(), and Transcoder.trans().
| String.utf8Clean | ( | $ | str | ) |
Strips out any bad bytes from a UTF-8 string and returns the rest Does not require any multibyte PHP libraries
| $input | string input string |
Definition at line 384 of file String.inc.php.
References strlen(), and substr().
Referenced by regexp_grep(), regexp_match(), regexp_match_all(), regexp_match_get(), regexp_replace(), regexp_replace_callback(), and regexp_split().
1.5.6