| 
    Open Journal Systems
    3.3.0
    
   | 
 
Static Public Member Functions | |
| static | camelize ($string, $type=CAMEL_CASE_HEAD_UP) | 
| static | concatTitleFields ($fields) | 
| static | dateformatPHP2JQueryDatepicker ($phpFormat) | 
| static | encode_mime_header ($string) | 
| static | enumerateAlphabetically ($steps) | 
| static | generateUUID () | 
| static | hasMBString () | 
| static | hasPCREUTF8 () | 
| static | html2text ($html) | 
| static | init () | 
| static | mime_content_type ($filename, $suggestedExtension='') | 
| static | regexp_grep ($pattern, $input) | 
| static | regexp_match ($pattern, $subject) | 
| static | regexp_match_all ($pattern, $subject, &$matches) | 
| static | regexp_match_get ($pattern, $subject, &$matches) | 
| static | regexp_quote ($string, $delimiter='/') | 
| static | regexp_replace ($pattern, $replacement, $subject, $limit=-1) | 
| static | regexp_replace_callback ($pattern, $callback, $subject, $limit=-1) | 
| static | regexp_split ($pattern, $subject, $limit=-1) | 
| static | stripUnsafeHtml ($input) | 
| static | strlen ($string) | 
| static | strpos ($haystack, $needle, $offset=0) | 
| static | strrpos ($haystack, $needle) | 
| static | strtolower ($string) | 
| static | strtoupper ($string) | 
| static | substr ($string, $start, $length=null) | 
| static | substr_count ($haystack, $needle) | 
| static | ucfirst ($string) | 
| static | uncamelize ($string) | 
String manipulation wrapper class.
Definition at line 46 of file PKPString.inc.php.
      
  | 
  static | 
Transform "handler-class" to "HandlerClass" and "my-op" to "myOp".
| $string | input string | 
| $type | which kind of camel case? | 
Definition at line 435 of file PKPString.inc.php.
References strtolower_codesafe(), and substr().
Referenced by MetadataProperty\getId(), PKPComponentRouter\getRequestedComponent(), and PKPComponentRouter\getRequestedOp().
      
  | 
  static | 
Joins two title string fragments (in $fields) either with a space or a colon.
| $fields | array | 
Definition at line 410 of file PKPString.inc.php.
References substr().
Referenced by PKPPublication\getLocalizedFullTitle().
      
  | 
  static | 
Matches each symbol of PHP strftime format string to jQuery Datepicker widget date format.
| $phpFormat | string | 
Definition at line 499 of file PKPString.inc.php.
References strlen().
      
  | 
  static | 
| $string | string Input MIME header to encode. | 
Definition at line 206 of file PKPString.inc.php.
Referenced by Mail\encodeDisplayName().
      
  | 
  static | 
Get a letter $steps places after 'A'
| $steps | int | 
Definition at line 473 of file PKPString.inc.php.
Referenced by EditorDecisionWithEmailForm\_sendReviewMailToAuthor(), and PKPEditorDecisionHandler\importPeerReviews().
      
  | 
  static | 
Create a new UUID (version 4)
Definition at line 481 of file PKPString.inc.php.
References strtoupper(), and substr().
Referenced by CounterReport\createXML(), and PLNPlugin\newUUID().
      
  | 
  static | 
Check if server has the mbstring library.
Definition at line 80 of file PKPString.inc.php.
Referenced by InstallForm\display().
      
  | 
  static | 
Check if server supports the PCRE_UTF8 modifier.
Definition at line 109 of file PKPString.inc.php.
      
  | 
  static | 
Convert limited HTML into a string.
| $html | string | 
Definition at line 395 of file PKPString.inc.php.
References regexp_replace().
Referenced by ArticleMedraXmlFilter\createContributorNode(), DataciteXmlFilter\createDescriptionsNode(), O4DOIXmlFilter\createOtherTextNode(), O4DOIXmlFilter\createTitleNode(), DataciteXmlFilter\createTitlesNode(), SubscriptionReportPlugin\display(), QueryNotificationManager\getNotificationMessage(), DBConnection\logAdodbMessage(), DOAJJsonFilter\process(), DOAJXmlFilter\process(), ArticlePubMedXmlFilter\process(), Mail\send(), OAIMetadataFormat_MARC\toXml(), and OAIMetadataFormat_MARC21\toXml().
      
  | 
  static | 
Perform initialization required for the string wrapper library.
Definition at line 51 of file PKPString.inc.php.
References Config\getVar(), and strtolower_codesafe().
Referenced by PKPApplication\__construct().
      
  | 
  static | 
| $filename | string Filename to test. | 
| $suggestedExtension | string Suggested file extension (used for common misconfigurations) | 
Definition at line 312 of file PKPString.inc.php.
References Registry\get(), Config\getVar(), strpos(), strtolower(), and substr().
Referenced by SubmissionFileManager\_handleCopy(), Mail\addAttachment(), PLNHandler\deposits(), FileManager\downloadByPath(), FileManager\getUploadedFileType(), TemporaryFileManager\handleUpload(), and PKPUploadPublicFileHandler\uploadFile().
      
  | 
  static | 
| $pattern | string Regular expression | 
| $input | string Input string | 
Definition at line 235 of file PKPString.inc.php.
      
  | 
  static | 
| $pattern | string Regular expression | 
| $subject | string String to apply regular expression to | 
Definition at line 245 of file PKPString.inc.php.
Referenced by MedraWebservice\_doRequest(), PKPComponentRouter\_validateServiceEndpointParts(), FilterHelper\configureFilter(), Mail\encodeDisplayName(), VersionCheck\getValidPluginVersionInfo(), PKPMetricsDAO\insertRecord(), Core\isUserAgentBot(), ValidatorTypeDescription\parseTypeName(), InstitutionalSubscriptionForm\readInputData(), and UserInstitutionalSubscriptionForm\readInputData().
      
  | 
  static | 
| $pattern | string Regular expression | 
| $subject | string String to apply regular expression to | 
| $matches | array Reference to receive matches | 
Definition at line 267 of file PKPString.inc.php.
Referenced by SubmissionSearch\_parseQuery(), PKPLocale\getParameterNames(), and uncamelize().
      
  | 
  static | 
| $pattern | string Regular expression | 
| $subject | string String to apply regular expression to | 
| $matches | array Reference to receive matches | 
Definition at line 256 of file PKPString.inc.php.
Referenced by MedraWebservice\_doRequest(), MarkupConversionHelper\buildSubmissionMetadata(), PluginHelper\extractPlugin(), and ResolverPlugin\fetch().
      
  | 
  static | 
| $string | string String to quote | 
| $delimiter | string Delimiter for regular expression | 
Definition at line 225 of file PKPString.inc.php.
      
  | 
  static | 
| $pattern | string Regular expression | 
| $replacement | string String to replace matches in $subject with | 
| $subject | string String to apply regular expression to | 
| $limit | int Number of replacements to perform, maximum, or -1 for no limit. | 
Definition at line 279 of file PKPString.inc.php.
Referenced by Citation\_cleanCitationString(), MedraWebservice\_doRequest(), DataciteExportPlugin\_getObjectUrl(), DOIPubIdPlugin\addPublicationFormFields(), ImmersionThemePlugin\addSiteWideData(), Core\cleanFileVar(), FunctionalMedraExportTest\cleanXml(), ArticleMedraXmlFilter\createArticleNode(), IssueMedraXmlFilter\createIssueNode(), O4DOIXmlFilter\createSerialVersionNode(), DataciteExportPlugin\depositXML(), ViewReportPlugin\display(), ArticleReportPlugin\display(), SubmissionSearchIndex\filterKeywords(), PKPOAIMetadataFormat_DC\formatElement(), PubIdPlugin\getPubId(), html2text(), LoginHandler\index(), HealthSciencesThemePlugin\loadTemplateData(), CitationListTokenizerFilter\process(), DataciteXmlFilter\process(), DOIPubIdExportPlugin\saveRegisteredDoi(), and Validation\suggestUsername().
      
  | 
  static | 
| $pattern | string Regular expression | 
| $callback | callback PHP callback to generate content to replace matches with | 
| $subject | string String to apply regular expression to | 
| $limit | int Number of replacements to perform, maximum, or -1 for no limit. | 
Definition at line 291 of file PKPString.inc.php.
      
  | 
  static | 
| $pattern | string Regular expression | 
| $subject | string String to apply regular expression to | 
| $limit | int Number of times to match; -1 for unlimited | 
Definition at line 302 of file PKPString.inc.php.
Referenced by UserInstitutionalSubscriptionForm\execute(), SubmissionSearchIndex\filterKeywords(), and UserInstitutionalSubscriptionForm\readInputData().
      
  | 
  static | 
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 377 of file PKPString.inc.php.
References Config\getVar().
Referenced by SubmissionEventLogGridHandler\_formatEmail(), SubmissionMailTemplate\assignParams(), NotificationsGridCellProvider\getCellActions(), and PKPEditorDecisionHandler\importPeerReviews().
      
  | 
  static | 
| $string | string Input string | 
Definition at line 128 of file PKPString.inc.php.
Referenced by UserDetailsForm\__construct(), dateformatPHP2JQueryDatepicker(), SubmissionSearchIndex\filterKeywords(), PKPLibraryFileManager\generateFileName(), FormValidatorLength\isValid(), FileManager\truncateFileName(), and uncamelize().
      
  | 
  static | 
| $haystack | string Input haystack to search | 
| $needle | string Input needle to search for | 
| $offset | int Offset at which to begin searching | 
Definition at line 139 of file PKPString.inc.php.
Referenced by PKPLibraryFileManager\generateFileName(), PluginGalleryDAO\getNewestCompatible(), and mime_content_type().
      
  | 
  static | 
| $haystack | string Haystack to search | 
| $needle | string Needle to search haystack for | 
Definition at line 149 of file PKPString.inc.php.
      
  | 
  static | 
| $string | string Input string | 
Definition at line 169 of file PKPString.inc.php.
Referenced by SubmissionSearch\_parseQueryInternal(), DOIPubIdPlugin\addPublicationFormFields(), SubmissionSearchIndex\filterKeywords(), AuthorDAO\getAuthorsAlphabetizedByJournal(), PluginGalleryDAO\getNewestCompatible(), PubIdPlugin\getPubId(), PKPHandler\initialize(), and mime_content_type().
      
  | 
  static | 
| $string | string Input string | 
Definition at line 178 of file PKPString.inc.php.
Referenced by generateUUID().
      
  | 
  static | 
| $string | string Subject to extract substring from | 
| $start | int Position to start from | 
| $length | int Length to extract, or false for entire string from start position | 
Definition at line 160 of file PKPString.inc.php.
Referenced by camelize(), concatTitleFields(), SubmissionSearchIndex\filterKeywords(), PKPLibraryFileManager\generateFileName(), generateUUID(), QuickSubmitForm\initData(), PKPHandler\initialize(), mime_content_type(), PKPSubmissionSubmitStep1Form\setPublicationData(), Validation\suggestUsername(), and FileManager\truncateFileName().
      
  | 
  static | 
| $haystack | string Input string to search | 
| $needle | string String to search within $haystack for | 
Definition at line 197 of file PKPString.inc.php.
      
  | 
  static | 
| $string | string Input string | 
Definition at line 187 of file PKPString.inc.php.
      
  | 
  static | 
Transform "HandlerClass" to "handler-class" and "myOp" to "my-op".
| $string | 
Definition at line 455 of file PKPString.inc.php.
References regexp_match_all(), strlen(), strtolower_codesafe(), and ucfirst_codesafe().
Referenced by PKPComponentRouter\url().