public function compose(string $format, array $compose = [], string $method = 'compose')
    {
        if (! \in_array($format, $this->formats)) {
            return $this->composeError(null, [], 406);
        } elseif (! \method_exists($this, $method.\ucwords($format))) {
            throw new RuntimeException('Call to undefine method ['.$method.\ucwords($format).'].');
        }

        $config = $compose['on'][$format] ?? [];

        $config['view'] = $compose['view'];

        return $this->{$method.\ucwords($format)}(
            $this->prepareDataValue($config, $compose['data']),
            $compose['status'],
            $config
        );
    }