public function __construct($hostname = null) { $this->redis = Redis::instance(); $this->hostname = $hostname ?: (function_exists('gethostname') ? gethostname() : php_uname('n')); }