3 namespace MediaWiki\Session
;
6 * OverflowException specific to the SessionManager, used when the request had multiple possible
7 * sessions tied for top priority.
11 class SessionOverflowException
extends \OverflowException
{
12 /** @var SessionInfo[] */
13 private $sessionInfos;
16 * @param SessionInfo[] $sessionInfos Must have at least two elements
18 * @throws \InvalidArgumentException If $sessionInfos has less than 2 elements
20 function __construct( array $sessionInfos, $msg ) {
21 if ( count( $sessionInfos ) < 2 ) {
22 throw new \
InvalidArgumentException( 'Expected at least two SessionInfo objects.' );
24 parent
::__construct( $msg );
25 $this->sessionInfos
= $sessionInfos;
29 * @return SessionInfo[]
31 public function getSessionInfos() : array {
32 return $this->sessionInfos
;