1<?php 2/** 3 * Copyright since 2007 PrestaShop SA and Contributors 4 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA 5 * 6 * NOTICE OF LICENSE 7 * 8 * This source file is subject to the Open Software License (OSL 3.0) 9 * that is bundled with this package in the file LICENSE.md. 10 * It is also available through the world-wide-web at this URL: 11 * https://opensource.org/licenses/OSL-3.0 12 * If you did not receive a copy of the license and are unable to 13 * obtain it through the world-wide-web, please send an email 14 * to license@prestashop.com so we can send you a copy immediately. 15 * 16 * DISCLAIMER 17 * 18 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer 19 * versions in the future. If you wish to customize PrestaShop for your 20 * needs please refer to https://devdocs.prestashop.com/ for more information. 21 * 22 * @author PrestaShop SA and Contributors <contact@prestashop.com> 23 * @copyright Since 2007 PrestaShop SA and Contributors 24 * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) 25 */ 26 27namespace PrestaShopBundle\Routing\Converter; 28 29use PrestaShopBundle\Routing\Converter\Exception\RouteNotFoundException; 30 31/** 32 * Interface LegacyRouteProviderInterface is used by LegacyUrlConverter to fetch 33 * the information about legacy routes, stored in LegacyRoute objects. 34 */ 35interface LegacyRouteProviderInterface 36{ 37 /** 38 * Returns the list of LegacyRoute based on what was set in the routing files. 39 * 40 * @return LegacyRoute[] 41 */ 42 public function getLegacyRoutes(); 43 44 /** 45 * Returns the list of controllers, their action and the associated route. 46 * e.g: $controllerActions = [ 47 * 'AdminPreferences' => [ 48 * 'index' => 'admin_preferences', 49 * 'update' => 'admin_preferences_save', 50 * ], 51 * 'AdminMeta' => [ 52 * 'index' => 'admin_metas_index', 53 * 'search' => 'admin_metas_search', 54 * ], 55 * ];. 56 * 57 * @return array 58 */ 59 public function getControllersActions(); 60 61 /** 62 * Return the list of actions for a defined controller. 63 * 64 * @param string $controller 65 * 66 * @return string[] 67 */ 68 public function getActionsByController($controller); 69 70 /** 71 * Return the LegacyRoute object matching $controller and $action. 72 * 73 * @param string $controller 74 * @param string $action 75 * 76 * @return LegacyRoute 77 * 78 * @throws RouteNotFoundException 79 */ 80 public function getLegacyRouteByAction($controller, $action); 81} 82