Overview

Namespaces

  • Knot
    • Dict
      • Helpers
    • Exceptions
  • None

Classes

  • Knot\Dict
  • Knot\Dict\AbstractDictBody
  • Knot\Dict\ChildDict
  • Knot\Dict\HelperManager
  • Knot\Dict\Helpers\AbstractPHPArrayHelper
  • Knot\Dict\Helpers\PHPArrayChangerHelper
  • Knot\Dict\Helpers\PHPArrayEqualizerHelper
  • Knot\Dict\Helpers\UnderscoreHelper
  • Knot\Dict\ParentDict

Interfaces

  • Knot\Dict\Helpers\HelperInterface

Traits

  • Knot\Dict\ArrayAccessTrait
  • Knot\Dict\CountableTrait
  • Knot\Dict\IteratorAggregateTrait
  • Knot\Dict\PathOperationsTrait

Exceptions

  • Knot\Exceptions\FunctionExecuteException
  • Knot\Exceptions\WrongArrayPathException
  • Knot\Exceptions\WrongFunctionException

Functions

  • ar
  • arr
  • arrRef
  • is_dict
  • Overview
  • Namespace
  • Class
 1: <?php
 2: /**
 3:  * Created by PhpStorm.
 4:  * User: kalaomer
 5:  * Date: 31.05.2015
 6:  * Time: 01:16
 7:  */
 8: 
 9: namespace Knot\Dict\Helpers;
10: 
11: abstract class AbstractPHPArrayHelper {
12: 
13:     protected function convertPHPFunctionToRoute($phpFunctionName)
14:     {
15:         $route = ltrim($phpFunctionName, "array_");
16: 
17:         return preg_replace_callback('/\_([a-z])/', function ($matches)
18:         {
19:             return strtoupper($matches[1]);
20:         }, $route);
21:     }
22: 
23: 
24:     protected static function convertRouteToPHPFunction($route)
25:     {
26:         $right_side = preg_replace_callback('/([A-Z])/', function ($matches)
27:         {
28:             return '_' . strtolower($matches[1]);
29:         }, $route);
30: 
31:         return 'array_' . $right_side;
32:     }
33: 
34: }
API documentation generated by ApiGen