Autodoc
  • Namespace
  • Class
  • Tree

Namespaces

  • BlueTihi
    • Context
  • Brickrouge
    • Element
      • Nodes
    • Renderer
    • Widget
  • ICanBoogie
    • ActiveRecord
    • AutoConfig
    • CLDR
    • Composer
    • Core
    • Event
    • Exception
    • HTTP
      • Dispatcher
      • Request
    • I18n
      • Translator
    • Mailer
    • Modules
      • Taxonomy
        • Support
      • Thumbnailer
        • Versions
    • Object
    • Operation
      • Dispatcher
    • Prototype
    • Routes
    • Routing
      • Dispatcher
    • Session
  • Icybee
    • ActiveRecord
      • Model
    • ConfigOperation
    • Document
    • EditBlock
    • Element
      • ActionbarContextual
      • ActionbarSearch
      • ActionbarToolbar
    • FormBlock
    • Installer
    • ManageBlock
    • Modules
      • Articles
      • Cache
        • Collection
        • ManageBlock
      • Comments
        • ManageBlock
      • Contents
        • ManageBlock
      • Dashboard
      • Editor
        • Collection
      • Files
        • File
        • ManageBlock
      • Forms
        • Form
        • ManageBlock
      • I18n
      • Images
        • ManageBlock
      • Members
      • Modules
        • ManageBlock
      • Nodes
        • ManageBlock
        • Module
      • Pages
        • BreadcrumbElement
        • LanguagesElement
        • ManageBlock
        • NavigationBranchElement
        • NavigationElement
        • Page
        • PageController
      • Registry
      • Search
      • Seo
      • Sites
        • ManageBlock
      • Taxonomy
        • Terms
          • ManageBlock
        • Vocabulary
          • ManageBlock
      • Users
        • ManageBlock
        • NonceLogin
        • Roles
      • Views
        • ActiveRecordProvider
        • Collection
        • View
    • Operation
      • ActiveRecord
      • Constructor
      • Module
      • Widget
    • Rendering
  • None
  • Patron
  • PHP

Classes

  • ActiveRecord
  • Cache
  • Configs
  • Core
  • DateTime
  • Debug
  • DeleteOperation
  • Errors
  • Event
  • EventHook
  • Events
  • FileCache
  • FormattedString
  • Helpers
  • I18n
  • Image
  • Inflections
  • Inflector
  • Models
  • Module
  • Modules
  • Object
  • Operation
  • PingOperation
  • Prototype
  • Route
  • Routes
  • SaveOperation
  • Session
  • TimeZone
  • TimeZoneLocation
  • Uploaded
  • Vars
  • VarsIterator

Interfaces

  • StorageInterface
  • ToArray
  • ToArrayRecursive

Traits

  • PrototypeTrait
  • ToArrayRecursiveTrait

Exceptions

  • AlreadyAuthenticated
  • AuthenticationRequired
  • Exception
  • ModuleConstructorMissing
  • ModuleIsDisabled
  • ModuleNotDefined
  • OffsetError
  • OffsetNotDefined
  • OffsetNotReadable
  • OffsetNotWritable
  • PermissionRequired
  • PropertyError
  • PropertyIsReserved
  • PropertyNotDefined
  • PropertyNotReadable
  • PropertyNotWritable
  • RouteNotDefined
  • SecurityException

Constants

  • TOKEN_ALPHA
  • TOKEN_ALPHA_UPCASE
  • TOKEN_NUMERIC
  • TOKEN_SYMBOL
  • TOKEN_SYMBOL_WIDE

Functions

  • array_flatten
  • array_insert
  • array_merge_recursive
  • camelize
  • capitalize
  • downcase
  • dump
  • escape
  • escape_all
  • exact_array_merge_recursive
  • excerpt
  • format
  • generate_token
  • generate_token_wide
  • generate_v4_uuid
  • get_autoconfig
  • humanize
  • hyphenate
  • log
  • log_error
  • log_info
  • log_success
  • log_time
  • normalize
  • normalize_namespace_part
  • normalize_url_path
  • pbkdf2
  • pluralize
  • remove_accents
  • shorten
  • singularize
  • sort_by_weight
  • stable_sort
  • strip_root
  • titleize
  • unaccent_compare
  • unaccent_compare_ci
  • underscore
  • upcase

Class Inflections

A representation of the inflections used by an inflector.

Namespace: ICanBoogie
Located at vendor/icanboogie/inflector/lib/inflections.php

Methods summary

public static ICanBoogie\Inflections
# get( string $locale = 'en' )

Returns inflections for the specified locale.

Returns inflections for the specified locale.

Note: Inflections are shared for the same locale. If you need to alter an instance you SHOULD clone it first, otherwise your changes will affect others.

Parameters

$locale
string
$locale

Returns

ICanBoogie\Inflections
public
# __get( string $property )

Returns the ICanBoogie\Inflections::$acronyms, ICanBoogie\Inflections::$acronym_regex, ICanBoogie\Inflections::$plurals, ICanBoogie\Inflections::$singulars, ICanBoogie\Inflections::$uncountables and ICanBoogie\Inflections::$humans properties.

Returns the ICanBoogie\Inflections::$acronyms, ICanBoogie\Inflections::$acronym_regex, ICanBoogie\Inflections::$plurals, ICanBoogie\Inflections::$singulars, ICanBoogie\Inflections::$uncountables and ICanBoogie\Inflections::$humans properties.

Parameters

$property
string
$property

Throws

ICanBoogie\PropertyNotDefined
in attempt to read an unaccessible property. If the ICanBoogie\PropertyNotDefined class is not available a InvalidArgumentException is thrown instead.
public
# acronym( mixed $word )

Specifies a new acronym. An acronym must be specified as it will appear in a camelized string. An underscore string that contains the acronym will retain the acronym when passed to ICanBoogie\camelize(), ICanBoogie\humanize(), or ICanBoogie\titleize(). A camelized string that contains the acronym will maintain the acronym when titleized or humanized, and will convert the acronym into a non-delimited single lowercase word when passed to ICanBoogie\underscore().

Specifies a new acronym. An acronym must be specified as it will appear in a camelized string. An underscore string that contains the acronym will retain the acronym when passed to ICanBoogie\camelize(), ICanBoogie\humanize(), or ICanBoogie\titleize(). A camelized string that contains the acronym will maintain the acronym when titleized or humanized, and will convert the acronym into a non-delimited single lowercase word when passed to ICanBoogie\underscore().

$this->acronym('HTML');
$this->titleize('html');                 // 'HTML'
$this->camelize('html');                 // 'HTML'
$this->underscore('MyHTML');             // 'my_html'

The acronym, however, must occur as a delimited unit and not be part of another word for conversions to recognize it:

$this->acronym('HTTP');
$this->camelize('my_http_delimited');    // 'MyHTTPDelimited'
$this->camelize('https');                // 'Https', not 'HTTPs'
$this->underscore('HTTPS');              // 'http_s', not 'https'

$this->acronym('HTTPS');
$this->camelize('https');                // 'HTTPS'
$this->underscore('HTTPS');              // 'https'

Note: Acronyms that are passed to ICanBoogie\pluralize() will no longer be recognized, since the acronym will not occur as a delimited unit in the pluralized result. To work around this, you must specify the pluralized form as an acronym as well:

$this->acronym('API');
$this->camelize($this->pluralize('api')); // 'Apis'

$this->acronym('APIs');
$this->camelize($this->pluralize('api')); // 'APIs'

ICanBoogie\Inflections::acronym() may be used to specify any word that contains an acronym or otherwise needs to maintain a non-standard capitalization. The only restriction is that the word must begin with a capital letter.

$this->acronym('RESTful');
$this->underscore('RESTful');             // 'restful'
$this->underscore('RESTfulController');   // 'restful_controller'
$this->titleize('RESTfulController');     // 'RESTful Controller'
$this->camelize('restful');               // 'RESTful'
$this->camelize('restful_controller');    // 'RESTfulController'

$this->acronym('McHammer');
$this->underscore('McHammer');            // 'mchammer'
$this->camelize('mchammer');              // 'McHammer'
public
# plural( string $rule, string $replacement )

Specifies a new pluralization rule and its replacement.

Specifies a new pluralization rule and its replacement.

$this->plural('/^(ax|test)is$/i', '\1es');
$this->plural('/(buffal|tomat)o$/i', '\1oes');
$this->plural('/^(m|l)ouse$/i', '\1ice');

Parameters

$rule
string
$rule A regex string.
$replacement
string
$replacement The replacement should always be a string that may include references to the matched data from the rule.
public
# singular( string $rule, string $replacement )

Specifies a new singularization rule and its replacement.

Specifies a new singularization rule and its replacement.

$this->singular('/(n)ews$/i', '\1ews');
$this->singular('/([^aeiouy]|qu)ies$/i', '\1y');
$this->singular('/(quiz)zes$/i', '\1');

Parameters

$rule
string
$rule A regex string.
$replacement
string
$replacement The replacement should always be a string that may include references to the matched data from the rule.
public
# irregular( string $singular, string $plural )

Specifies a new irregular that applies to both pluralization and singularization at the same time. This can only be used for strings, not regular expressions. You simply pass the irregular in singular and plural form.

Specifies a new irregular that applies to both pluralization and singularization at the same time. This can only be used for strings, not regular expressions. You simply pass the irregular in singular and plural form.

$this->irregular('child', 'children');
$this->irregular('person', 'people');

Parameters

$singular
string
$singular
$plural
string
$plural
public
# uncountable( string|array $word )

Add uncountable words that shouldn't be attempted inflected.

Add uncountable words that shouldn't be attempted inflected.

$this->uncountable('money');
$this->uncountable(explode(' ', 'money information rice'));

Parameters

$word
string|array
$word
public
# human( string $rule, string $replacement )

Specifies a humanized form of a string by a regular expression rule or by a string mapping. When using a regular expression based replacement, the normal humanize formatting is called after the replacement. When a string is used, the human form should be specified as desired (example: 'The name', not 'the_name').

Specifies a humanized form of a string by a regular expression rule or by a string mapping. When using a regular expression based replacement, the normal humanize formatting is called after the replacement. When a string is used, the human form should be specified as desired (example: 'The name', not 'the_name').

$this->human('/_cnt$/i', '\1_count');
$this->human('legacy_col_person_name', 'Name');

Parameters

$rule
string
$rule A regular expression rule or a string mapping. Strings that starts with "/", "#" or "~" are recognized as regular expressions.
$replacement
string
$replacement

Magic methods summary

Properties summary

protected array[string]string $plurals
#

Rules for ICanBoogie\pluralize().

Rules for ICanBoogie\pluralize().

protected array[string]string $singulars
#

Rules for ICanBoogie\singularize().

Rules for ICanBoogie\singularize().

protected array[]string $uncountables
#

Uncountables.

Uncountables.

protected array[string]string $humans
#

Rules for ICanBoogie\humanize().

Rules for ICanBoogie\humanize().

protected array[string]string $acronyms
#

Acronyms.

Acronyms.

protected string $acronym_regex
#

Acronyms regex.

Acronyms regex.

Magic properties

public read-only array $plurals
#

Rules for ICanBoogie\pluralize().

Rules for ICanBoogie\pluralize().

public read-only array $singulars
#

Rules for ICanBoogie\singularize().

Rules for ICanBoogie\singularize().

public read-only array $uncountables
#

Uncountables.

Uncountables.

public read-only array $humans
#

Rules for ICanBoogie\humanize().

Rules for ICanBoogie\humanize().

public read-only array $acronyms
#

Acronyms.

Acronyms.

public read-only array $acronym_regex
#

Acronyms regex.

Acronyms regex.

Autodoc API documentation generated by ApiGen 2.8.0