<?php
require_once 'DataSourceInterface.php';
class Listing
{
private $_dataSource;
public function __construct(DataSourceInterface $dataSource)
{
$this->_dataSource = $dataSource;
}
public function open()
{
$this->_dataSource->open();
}
public function read()
{
return $this->_dataSource->read();
}
public function close()
{
$this->_dataSource->close();
}
}