<?php
interface OrderRepositoryInterface
{
public function getAll($data);
}
<?php
use OrderRepositoryInterface;
use Model\Order;
class OrderRepostory implements OrderRepositoryInterface
{
private $order;
public function __contruct(Order $order){
$this->order = $order;
}
public function getAll($data){
$this->order->all();
}
}
<?php
use OrderRepostory;
use Controller;
class OrderController extends Controller
{
private $order;
public function __contruct(OrderRepostory $order){
$this->order = $order;
}
public function getIndex(){
$data = '';
$this->order->getAll($data);
}
}