@@ 39-52 (lines=14) @@ | ||
36 | return $reflectionClass; |
|
37 | } |
|
38 | ||
39 | public function getCtor($class) |
|
40 | { |
|
41 | $cacheKey = self::CACHE_KEY_CTORS.strtolower($class); |
|
42 | ||
43 | $reflectedCtor = $this->cache->fetch($cacheKey); |
|
44 | ||
45 | if ($reflectedCtor === false) { |
|
46 | $reflectionClass = $this->getClass($class); |
|
47 | $reflectedCtor = $reflectionClass->getConstructor(); |
|
48 | $this->cache->store($cacheKey, $reflectedCtor); |
|
49 | } |
|
50 | ||
51 | return $reflectedCtor; |
|
52 | } |
|
53 | ||
54 | public function getCtorParams($class) |
|
55 | { |
|
@@ 119-132 (lines=14) @@ | ||
116 | return $typeHint; |
|
117 | } |
|
118 | ||
119 | public function getFunction($functionName) |
|
120 | { |
|
121 | $lowFunc = strtolower($functionName); |
|
122 | $cacheKey = self::CACHE_KEY_FUNCS.$lowFunc; |
|
123 | ||
124 | $reflectedFunc = $this->cache->fetch($cacheKey); |
|
125 | ||
126 | if (false === $reflectedFunc) { |
|
127 | $reflectedFunc = new \ReflectionFunction($functionName); |
|
128 | $this->cache->store($cacheKey, $reflectedFunc); |
|
129 | } |
|
130 | ||
131 | return $reflectedFunc; |
|
132 | } |
|
133 | ||
134 | public function getMethod($classNameOrInstance, $methodName) |
|
135 | { |