Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
<?php
2
 
3
/*
4
 * This file is part of composer/pcre.
5
 *
6
 * (c) Composer <https://github.com/composer>
7
 *
8
 * For the full copyright and license information, please view
9
 * the LICENSE file that was distributed with this source code.
10
 */
11
 
12
namespace Composer\Pcre;
13
 
14
final class MatchAllResult
15
{
16
    /**
17
     * An array of match group => list of matched strings
18
     *
19
     * @readonly
20
     * @var array<int|string, list<string|null>>
21
     */
22
    public $matches;
23
 
24
    /**
25
     * @readonly
26
     * @var 0|positive-int
27
     */
28
    public $count;
29
 
30
    /**
31
     * @readonly
32
     * @var bool
33
     */
34
    public $matched;
35
 
36
    /**
37
     * @param 0|positive-int $count
38
     * @param array<int|string, list<string|null>> $matches
39
     */
40
    public function __construct(int $count, array $matches)
41
    {
42
        $this->matches = $matches;
43
        $this->matched = (bool) $count;
44
        $this->count = $count;
45
    }
46
}