protected function getChain($key)
    {
        // If no key, set global chain
        if ($key === null) {
            return $this->getGlobalChain();
        }

        // Return chain for key
        if (isset($this->chains[$key])) {
            return $this->chains[$key];
        }
        return $this->chains[$key] = $this->buildChain();
    }