Susina Utils

InflectorInterface

Table of Contents

Methods

pluralize()  : string
Generate a plural name based on the passed in root.
singularize()  : string
Generate a singular name based on the passed in root.

Methods

pluralize()

Generate a plural name based on the passed in root.

public pluralize(string $root) : string
Parameters
$root : string

The root that needs to be pluralized (e.g. Author)

Return values
string —

The plural form of $root (e.g. Authors).

singularize()

Generate a singular name based on the passed in root.

public singularize(string $root) : string
Parameters
$root : string

The root that needs to be singularized (e.g. Authors)

Return values
string —

The singular form of $root (e.g. Author).

On this page

Search results