Maker
class Maker (View source)
internal |
Generates rule constraints classes and markdown table by extracting rules from Validation::class
metadata.
This class is not meant to be used directly and is not part of the public API.
Methods
static string
buildConstantsClass(array $variables)
No description
static string
buildConstraintClass(array $variables)
No description
static void
clearConstraintsDirectory(string $directory)
No description
static object
extractMetadataFromDocBlockMethod(string $method)
No description
static string
getFileDocBlock()
No description
static array
getValidationClassDocBlockMethods()
No description
static string
makeConstants(string|null $namespacePrefix = null, string|null $className = null)
Makes rules names as constants.
static array
makeConstraints(string|null $namespacePrefix = null, string|null $classNameSuffix = null, bool $alwaysAddSuffix = false)
Make rule constraints classes.
static string
makeRulesMarkdownTable(string|null $classNameSuffix = null, bool $alwaysAddSuffix = false)
Makes rules markdown table.
Details
static private string
buildConstantsClass(array $variables)
No description
static private string
buildConstraintClass(array $variables)
No description
static private void
clearConstraintsDirectory(string $directory)
No description
static private object
extractMetadataFromDocBlockMethod(string $method)
No description
static private string
getFileDocBlock()
No description
static private array
getValidationClassDocBlockMethods()
No description
static string
makeConstants(string|null $namespacePrefix = null, string|null $className = null)
Makes rules names as constants.
static array
makeConstraints(string|null $namespacePrefix = null, string|null $classNameSuffix = null, bool $alwaysAddSuffix = false)
Make rule constraints classes.
static string
makeRulesMarkdownTable(string|null $classNameSuffix = null, bool $alwaysAddSuffix = false)
Makes rules markdown table.