Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 150
Zeile 7... Zeile 7...
7
 
7
 
Zeile 8... Zeile 8...
8
declare(strict_types=1);
8
declare(strict_types=1);
Zeile -... Zeile 9...
-
 
9
 
9
 
10
namespace Nette\Utils;
10
namespace Nette\Utils;
11
 
Zeile 11... Zeile 12...
11
 
12
use JetBrains\PhpStorm\Language;
Zeile 201... Zeile 202...
201
	/**
202
	/**
202
	 * Returns only those array items, which matches a regular expression $pattern.
203
	 * Returns only those array items, which matches a regular expression $pattern.
203
	 * @param  string[]  $array
204
	 * @param  string[]  $array
204
	 * @return string[]
205
	 * @return string[]
205
	 */
206
	 */
206
	public static function grep(array $array, string $pattern, int $flags = 0): array
207
	public static function grep(
-
 
208
		array $array,
-
 
209
		#[Language('RegExp')]
-
 
210
		string $pattern,
-
 
211
		int $flags = 0
-
 
212
	): array
207
	{
213
	{
208
		return Strings::pcre('preg_grep', [$pattern, $array, $flags]);
214
		return Strings::pcre('preg_grep', [$pattern, $array, $flags]);
209
	}
215
	}