Apple_Push_API\Request\Request::build_content PHP Method

build_content() private method

TODO The exporter has an abstracted article class. Should we have something similar here? That way this method could live there.
Since: 0.2.0
private build_content ( string $article, array $bundles = [], array $meta = [] ) : string
$article string
$bundles array
$meta array
return string
    private function build_content($article, $bundles = array(), $meta = array())
    {
        $bundles = array_unique($bundles);
        $content = '';
        // Add custom meta for request.
        $meta = apply_filters('apple_news_api_post_meta', $meta);
        if (!empty($meta['data']) && is_array($meta['data'])) {
            $content .= $this->mime_builder->add_metadata($meta);
        }
        $content .= $this->mime_builder->add_json_string('my_article', 'article.json', $article);
        foreach ($bundles as $bundle) {
            $content .= $this->mime_builder->add_content_from_file($bundle);
        }
        $content .= $this->mime_builder->close();
        return $content;
    }