public function substitute()
    {
        if (isset($this->_substitutes[$this->_substituteIndex])) {
            return $this->_substitutes[$this->_substituteIndex++];
        }
        return $this->_substitutes ? end($this->_substitutes) : null;
    }