Zend\Stdlib\Glob
Wrapper for glob with fallback if GLOB_BRACE is not available.
Synopsis
class Glob
{
- // constants
- const GLOB_MARK = 0x01;
- const GLOB_NOSORT = 0x02;
- const GLOB_NOCHECK = 0x04;
- const GLOB_NOESCAPE = 0x08;
- const GLOB_BRACE = 0x10;
- const GLOB_ONLYDIR = 0x20;
- const GLOB_ERR = 0x40;
- // methods
- public static array glob()
- protected static array systemGlob()
- protected static array fallbackGlob()
- protected static int|null nextBraceSub()
Constants
Name | Value |
---|---|
GLOB_MARK | 0x01 |
GLOB_NOSORT | 0x02 |
GLOB_NOCHECK | 0x04 |
GLOB_NOESCAPE | 0x08 |
GLOB_BRACE | 0x10 |
GLOB_ONLYDIR | 0x20 |
GLOB_ERR | 0x40 |
Methods
protected
- fallbackGlob() — Expand braces manually, then use the system glob.
- nextBraceSub() — Find the end of the sub-pattern in a brace expression.
- systemGlob() — Use the glob function provided by the system.
public
- glob() — Find pathnames matching a pattern.