Class PreComputedInflector
Decorator used to add pre-computed inflection mappings to an inflector
- Guzzle\Inflection\PreComputedInflector implements Guzzle\Inflection\InflectorInterface
Methods summary
-
public
__construct ( Guzzle\Inflection\InflectorInterface $inflector, array $snake = array(), array $camel = array(), bool $mirror = false )
-
public
snake ( string $word )
Converts strings from camel case to snake case (e.g. CamelCase camel_case).
-
public
camel ( string $word )
Converts strings from snake_case to upper CamelCase
Methods detail
#
public
__construct( Guzzle\Inflection\InflectorInterface
$inflector, array $snake = array(), array $camel = array(), boolean $mirror = false )
Parameters
- $inflector
Guzzle\Inflection\InflectorInterface
$inflector Inflector being decorated- $snake
array
$snake Hash of pre-computed camel to snake- $camel
array
$camel Hash of pre-computed snake to camel- $mirror
boolean
$mirror Mirror snake and camel reflections
Converts strings from camel case to snake case (e.g. CamelCase camel_case).
Parameters
- $word
string
$word Word to convert to snake case
Returns
string
Implementation of
Converts strings from snake_case to upper CamelCase
Parameters
- $word
string
$word Value to convert into upper CamelCase
Returns
string
Implementation of
Magic methods summary
Properties summary
protected
array
|
$mapping |
#
Array of pre-computed inflections |
protected
|
$decoratedInflector |
#
Decorated inflector |