Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • DataStructureString
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class DataStructureString

String Data Structure helper

Provides utility methods to assist in manipulating strings.

Package: blesta\helpers\data\structure\string
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at helpers/data_structure/string/data_structure_string.php
Methods summary
public string
# random( integer $length = 8, string $pool = null, array $options = [] )

Generates a random string from a list of characters

Generates a random string from a list of characters

Parameters

$length
The length of the random string
$pool

The pool of characters to include in the random string, defaults to alpha numeric characters. Can be configured further in $options['types']

$options

An array of options including:

  • types A numerically indexed-array of character-types that may be used to generate the random string (i.e. "alpha", "alpha_lower", "alpha_upper", and/or "numeric") (optional)

Returns

string
A randomly generated word with the given length
public
# truncate( string $input, array $options = [] )

Truncates the string using the given options

Truncates the string using the given options

Parameters

$input
The input string to truncate
$options

A list of options including any of the following:

  • length The number of characters to truncate to - NOT multi-byte-safe (optional, default null)
  • word_length The number of words to truncate to, broken at spaces (optional, default null)
  • line_break True to truncate at the first new line, or false to allow new line breaks (optional, default true)
public string
# htmlToText( string $html )

Converts the HTML given to text

Converts the HTML given to text

Parameters

$html
The HTML string

Returns

string
The textual representation of the HTML
public string
# removeFromText( string $text, string|array $content )

Removes the given $content from the provided $text

Removes the given $content from the provided $text

Parameters

$text
The full text string
$content

A string value, or numerically-indexed array of strings, representing exact textual matches from which to remove from $text

Returns

string
The provided $text with specific $content removed
Blesta API documentation generated by ApiGen