* @license GNU General Public License, version 2 (GPL-2.0) * * For full copyright and license information, please see * the docs/CREDITS.txt file. * */ namespace phpbb\report; use phpbb\report\exception\factory_invalid_argument_exception; class handler_factory { /** * @var \Symfony\Component\DependencyInjection\ContainerInterface */ protected $container; /** * Constructor * * @param \Symfony\Component\DependencyInjection\ContainerInterface $container */ public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container) { $this->container = $container; } /** * Return a new instance of an appropriate report handler * * @param string $type * @return \phpbb\report\report_handler_interface * @throws \phpbb\report\exception\factory_invalid_argument_exception if $type is not valid */ public function get_instance($type) { switch ($type) { case 'pm': return $this->container->get('phpbb.report.handlers.report_handler_pm'); break; case 'post': return $this->container->get('phpbb.report.handlers.report_handler_post'); break; } throw new factory_invalid_argument_exception(); } } b Ӌ=5Z(ؘ-K0բVlh}Rݰ#-Vy*_&gqo7L \h@(Gѱ8S^ټftIS(S*zABLv )!㓭Ҏ$/ݨ&2_c/БSMt̬Fd /lgviS 6kp^W_ersyR¿D',jNaEJ[i}W5v'|:V]?\l5 ']$2n=jW횻K7+u7{2J4,q]r*xyY%mar?lJK1~ɹ?c/2g54[/" \y7P!JTYXsk><x0HWL{*J!w$yTz}X=Z|a蕍r<'8Ĕ )3 J!SDwA_m78&=adb,sz'gI|[ӊ tnzܙ89TC&~DD!S@sz:3]ZØ" z|NןS{7 $8ҝ+and