HEX
Server: Apache
System: Linux v38079.2is.nl 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: democfellows (10015)
PHP: 8.1.34
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/creativefellows.nl/apics.creativefellows.nl/src/Domain/Feed/Service/FeedReader.php
<?php

namespace App\Domain\Feed\Service;

use App\Domain\Jobs\Repository\JobRepository;
use App\Domain\Jobs\Service\JobReader;
use App\Domain\XML\XmlJobData;
use App\Domain\XML\MySimpleXMLElement;

use Psr\Container\ContainerInterface;
use Slim\Interfaces\RouteParserInterface;

final class FeedReader
{
	private $jobReader;
	protected $container;
	protected $jobs = [];
	protected $xml;
	   
    public function __construct(
		ContainerInterface $container,
		RouteParserInterface $routeParser, 
		JobReader $jobReader,
		XmlJobData $XmlJobData
		
	){
		$this->container 	= $container;
		$this->router 		= $routeParser;
		$this->jobReader 	= $jobReader;
		$this->xml 			= $XmlJobData;
    }
	
	
	public function listJobsXml()
	{
		$this->xml->setDomain( $this->container->get('settings')['domain_path'] ); 
		$this->xml->setJobs( $this->jobReader->listAllJobs() );
	
		return $this->xml->asXML();
		
	}
	
}