Open Journal Systems  3.3.0
Guzzle\Inflection\PreComputedInflector Class Reference
Inheritance diagram for Guzzle\Inflection\PreComputedInflector:
Guzzle\Inflection\InflectorInterface

Public Member Functions

 __construct (InflectorInterface $inflector, array $snake=array(), array $camel=array(), $mirror=false)
 
 camel ($word)
 
 snake ($word)
 

Protected Attributes

 $decoratedInflector
 
 $mapping
 

Detailed Description

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

Definition at line 8 of file PreComputedInflector.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Inflection\PreComputedInflector::__construct ( InflectorInterface  $inflector,
array  $snake = array(),
array  $camel = array(),
  $mirror = false 
)
Parameters
InflectorInterface$inflectorInflector being decorated
array$snakeHash of pre-computed camel to snake
array$camelHash of pre-computed snake to camel
bool$mirrorMirror snake and camel reflections

Definition at line 31 of file PreComputedInflector.php.

Member Function Documentation

◆ camel()

Guzzle\Inflection\PreComputedInflector::camel (   $word)

Converts strings from snake_case to upper CamelCase

Parameters
string$wordValue to convert into upper CamelCase
Returns
string

Implements Guzzle\Inflection\InflectorInterface.

Definition at line 59 of file PreComputedInflector.php.

◆ snake()

Guzzle\Inflection\PreComputedInflector::snake (   $word)

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

Parameters
string$wordWord to convert to snake case
Returns
string

Implements Guzzle\Inflection\InflectorInterface.

Definition at line 45 of file PreComputedInflector.php.

Field Documentation

◆ $decoratedInflector

InflectorInterface Guzzle\Inflection\PreComputedInflector::$decoratedInflector
protected

Decorated inflector

Definition at line 23 of file PreComputedInflector.php.

◆ $mapping

array Guzzle\Inflection\PreComputedInflector::$mapping
protected
Initial value:
= array(
'snake' => array(),
'camel' => array()
)

Array of pre-computed inflections

Definition at line 14 of file PreComputedInflector.php.


The documentation for this class was generated from the following file: