1<?php 2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 3// 4// All Rights Reserved. See copyright.txt for details and a complete list of authors. 5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 6// $Id$ 7 8namespace Tiki\MailIn\Provider; 9 10class ProviderList 11{ 12 private $list = []; 13 14 function addProvider(ProviderInterface $provider) 15 { 16 $this->list[] = $provider; 17 } 18 19 function getList() 20 { 21 usort($this->list, function ($a, $b) { 22 return strcmp($a->getLabel(), $b->getLabel()); 23 }); 24 return $this->list; 25 } 26} 27