Apple_Exporter\Builders\Components::split_into_components PHP Method

split_into_components() private method

Split components from the source WordPress content.
private split_into_components ( ) : array
return array
    private function split_into_components()
    {
        // Loop though the first-level nodes of the body element. Components
        // might include child-components, like an Cover and Image.
        $result = array();
        $errors = array();
        foreach ($this->content_nodes() as $node) {
            $result = array_merge($result, $this->get_components_from_node($node));
        }
        // Process the result some more. It gets passed by reference for efficiency.
        // It's not like it's a big memory save but still relevant.
        // FIXME: Maybe this could have been done in a better way?
        $this->add_thumbnail_if_needed($result);
        $this->anchor_components($result);
        $this->add_pullquote_if_needed($result);
        return $result;
    }