/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Routing/ControllerMiddlewareOptions.php
49 строк
963 B
Amir Hossein Shokri
clean up redundant type hints in docblocks (#56690)
20 авг 2025, 16:36
Не верифицирован
20 авг 2025, 16:36
66d6f8f
Код
Авторство
О чём код?
<?php namespace Illuminate\Routing; class ControllerMiddlewareOptions { /** * The middleware options. * * @var array */ protected $options; /** * Create a new middleware option instance. * * @param array $options */ public function __construct(array &$options) { $this->options = &$options; } /** * Set the controller methods the middleware should apply to. * * @param mixed $methods * @return $this */ public function only($methods) { $this->options['only'] = is_array($methods) ? $methods : func_get_args(); return $this; } /** * Set the controller methods the middleware should exclude. * * @param mixed $methods * @return $this */ public function except($methods) { $this->options['except'] = is_array($methods) ? $methods : func_get_args(); return $this; } }