public function attach($value, $capture = null)
    {
        if (null === $capture) {
            $capture = $this->captureType;
        }

        switch ($capture) {
            case self::APPEND:
                $this->append($value);
                break;
            case self::PREPEND:
                $this->prepend($value);
                break;
            case self::SET:
                $this->set($value);
                break;
            default:
                throw new InvalidArgumentException(sprintf(
                    'Invalid capture type provided; must be any of the capture '
                    . 'type constants, "%s" received.',
                    is_scalar($capture) ? $capture : gettype($capture)
                ));
        }

        return $this;
    }