Class Guzzle\Inflection\PreComputedInflector


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

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$decoratedInflector Guzzle\Inflection\InflectorInterface Decorated inflector Guzzle\Inflection\PreComputedInflector
$mapping array Array of pre-computed inflections Guzzle\Inflection\PreComputedInflector

Property Details

$decoratedInflector protected property

Decorated inflector

$mapping protected property

Array of pre-computed inflections

protected array $mapping = ['snake' => [], 'camel' => []]

Method Details

__construct() public method

public void __construct ( Guzzle\Inflection\InflectorInterface $inflector, array $snake = [], array $camel = [], $mirror false )
$inflector Guzzle\Inflection\InflectorInterface

Inflector being decorated

$snake array

Hash of pre-computed camel to snake

$camel array

Hash of pre-computed snake to camel

$mirror bool

Mirror snake and camel reflections

camel() public method

Converts strings from snake_case to upper CamelCase

public string camel ( $word )
$word string

Value to convert into upper CamelCase

snake() public method

public void snake ( $word )