HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/deensekroon.komma-mediadesign.nl/wwwroot/App/Feeds/FeedController.php
<?php

namespace App\Feeds;


include_once $_SERVER['DOCUMENT_ROOT'] . '/App/Feeds/FeedService.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/App/Feeds/FeedXmlWriter.php';



class FeedController
{
    private $service;
    private $writer;

    public function __construct()
    {
        $this->service = new FeedService();
        $this->writer = new FeedXmlWriter();

    }

    /**
     * Write products to an XMl format
     */
    public function google()
    {
        // Get products for the feed
        $products = $this->service->productsForGoogleFeed();

        // Write products to an XML format
        $this->writer->writeGoogleFeed($products);
    }

    /**
     * Write products to an XMl format
     */
    public function daisycon()
    {
        // Get products for the feed
        $products = $this->service->productsForDaisyconFeed();

        // Write products to an XML format
        $this->writer->writeDaisyconFeed($products);
    }
}