protected function reflect($class = null) { if (!is_null($class) && \Kinesis\Type::exists($class)) { $this->_class = new \ReflectionClass($class); } if ($this->_class instanceof \ReflectionClass) { return $this->_class; } return false; }
protected function getDefaultCache() { $cacheClass = $this->Parameters['CacheClass']; $cacheParams = $this->Parameters['CacheParameters']; if (!is_array($cacheParams)) { $cacheParams = array(); } if (is_string($cacheClass) && \Kinesis\Type::exists($cacheClass)) { return new $cacheClass($cacheParams); } return null; }
protected function getDefaultDelegate() { $streamHandler = $this->Parameters['StreamHandler']; $streamCallback = $this->Parameters['StreamCallback']; if (\Kinesis\Type::exists($streamHandler)) { $handler = new $streamHandler($this->Stream); } $handlers = $this->Parameters['HandlerChain']; if (!is_array($handlers)) { $handlers = array($handlers); } if (count($handlers) > 0) { foreach ($handlers as $wrapClass) { if (\Kinesis\Type::exists($wrapClass)) { $handler = new $wrapClass($handler); } } } return new \Core\Delegate($handler, $streamCallback); }