public function getByIndex($index)
    {
        if (! is_numeric($index)) {
            throw new RuntimeException('Index needs to be a numeric value.');
        }

        $index = (int)$index;

        if ($index < 0) {
            $index += count($this->chain);
        }

        return isset($this->chain[$index])
            ? $this->chain[$index]
            : false;
    }