Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Support;
4
 
5
use RuntimeException;
6
 
7
class MultipleItemsFoundException extends RuntimeException
8
{
9
    /**
10
     * The number of items found.
11
     *
12
     * @var int
13
     */
14
    public $count;
15
 
16
    /**
17
     * Create a new exception instance.
18
     *
19
     * @param  int  $count
20
     * @param  int  $code
21
     * @param  \Throwable|null  $previous
22
     * @return void
23
     */
24
    public function __construct($count, $code = 0, $previous = null)
25
    {
26
        $this->count = $count;
27
 
28
        parent::__construct("$count items were found.", $code, $previous);
29
    }
30
 
31
    /**
32
     * Get the number of items found.
33
     *
34
     * @return int
35
     */
36
    public function getCount()
37
    {
38
        return $this->count;
39
    }
40
}