\Cake\CoreConventionsTrait

Provides methods that allow other classes access to conventions based inflections.

Summary

Methods
Properties
Constants
No public methods found
No public properties found
No constants found
_fixtureName()
_entityName()
_modelKey()
_modelNameFromKey()
_singularName()
_variableName()
_singularHumanName()
_camelize()
_pluralHumanName()
_pluginPath()
_pluginNamespace()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

_fixtureName()

_fixtureName(string  $name) : string

Creates a fixture name

Parameters

string $name

Model class name

Returns

string —

Singular model key

_entityName()

_entityName(string  $name) : string

Creates the proper entity name (singular) for the specified name

Parameters

string $name

Name

Returns

string —

Camelized and plural model name

_modelKey()

_modelKey(string  $name) : string

Creates the proper underscored model key for associations

If the input contains a dot, assume that the right side is the real table name.

Parameters

string $name

Model class name

Returns

string —

Singular model key

_modelNameFromKey()

_modelNameFromKey(string  $key) : string

Creates the proper model name from a foreign key

Parameters

string $key

Foreign key

Returns

string —

Model name

_singularName()

_singularName(string  $name) : string

Creates the singular name for use in views.

Parameters

string $name

Name to use

Returns

string —

Variable name

_variableName()

_variableName(string  $name) : string

Creates the plural variable name for views

Parameters

string $name

Name to use

Returns

string —

Plural name for views

_singularHumanName()

_singularHumanName(string  $name) : string

Creates the singular human name used in views

Parameters

string $name

Controller name

Returns

string —

Singular human name

_camelize()

_camelize(string  $name) : string

Creates a camelized version of $name

Parameters

string $name

name

Returns

string —

Camelized name

_pluralHumanName()

_pluralHumanName(string  $name) : string

Creates the plural human name used in views

Parameters

string $name

Controller name

Returns

string —

Plural human name

_pluginPath()

_pluginPath(string  $pluginName) : string

Find the correct path for a plugin. Scans $pluginPaths for the plugin you want.

Parameters

string $pluginName

Name of the plugin you want ie. DebugKit

Returns

string —

path path to the correct plugin.

_pluginNamespace()

_pluginNamespace(string  $pluginName) : string

Return plugin's namespace

Parameters

string $pluginName

Plugin name

Returns

string —

Plugin's namespace