\Guzzle\InflectionPreComputedInflector

Decorator used to add pre-computed inflection mappings to an inflector

Summary

Methods
Properties
Constants
__construct()
snake()
camel()
No public properties found
No constants found
No protected methods found
$mapping
$decoratedInflector
N/A
No private methods found
No private properties found
N/A

Properties

$mapping

$mapping : array

Type

array — Array of pre-computed inflections

Methods

__construct()

__construct(\Guzzle\Inflection\InflectorInterface  $inflector, array  $snake = array(), array  $camel = array(), boolean  $mirror = false) 

Parameters

\Guzzle\Inflection\InflectorInterface $inflector

Inflector being decorated

array $snake

Hash of pre-computed camel to snake

array $camel

Hash of pre-computed snake to camel

boolean $mirror

Mirror snake and camel reflections

snake()

snake(string  $word) : string

Converts strings from camel case to snake case (e.g. CamelCase camel_case).

Parameters

string $word

Word to convert to snake case

Returns

string

camel()

camel(string  $word) : string

Converts strings from snake_case to upper CamelCase

Parameters

string $word

Value to convert into upper CamelCase

Returns

string