NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class MemoizingInflector

Decorator used to add memoization to previously inflected words

  Guzzle\Inflection\MemoizingInflector implements Guzzle\Inflection\InflectorInterface

Namespace: Guzzle\Inflection
Located at Guzzle/Inflection/MemoizingInflector.php

## Methods summary

- `public` `__construct ( Guzzle\Inflection\InflectorInterface $inflector, int $maxCacheSize = 500 )`
- `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

- `protected` `pruneCache ( string $cache )`

  Prune one of the named caches by removing 20% of the cache if it is full

## Methods detail

# `public`
`__construct( `Guzzle\Inflection\InflectorInterface` $inflector, integer $maxCacheSize = 500 )`

#### Parameters

$inflector
  ``Guzzle\Inflection\InflectorInterface``
  $inflector Inflector being decorated
$maxCacheSize
  `integer`
  $maxCacheSize Maximum number of cached items to hold per cache

# `public string`
`snake( string $word )`

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

`Guzzle\Inflection\InflectorInterface::snake()`
# `public string`
`camel( string $word )`

Converts strings from snake_case to upper CamelCase

#### Parameters

$word
  `string`
  $word Value to convert into upper CamelCase

#### Returns

`string`

#### Implementation of

`Guzzle\Inflection\InflectorInterface::camel()`
# `protected`
`pruneCache( string $cache )`

Prune one of the named caches by removing 20% of the cache if it is full

#### Parameters

$cache
  `string`
  $cache Type of cache to prune

### Magic methods summary

## Properties summary

`protected array` | $cache | # Array of cached inflections
`protected integer` | $maxCacheSize | # Max entries per cache
`protected `Guzzle\Inflection\InflectorInterface`` | $decoratedInflector | # Decorated inflector