Libraries tagged by pattern match
chamber-orchestra/menu-bundle
822 Downloads
Symfony 8 navigation menu bundle with fluent tree builder, route-based active-item matching, role-based access control, runtime extensions for dynamic badges, PSR-6 tag-aware caching, and Twig rendering
zombietfk/thatcher
2 Downloads
A pattern matcher for arguments and arrays of data. Supports callbacks based on passed set
pfaciana/includefile
47 Downloads
Include-pattern matcher built on automattic/ignorefile
stougeiro/event
2 Downloads
Lightweight event dispatcher with wildcard pattern matching and automatic deduplication. Dispatch string-based events, register invokable listeners, and load configurations from PHP files — all with zero cache overhead.
leocore/router
5 Downloads
Lightweight PHP 8.2+ routing library with pattern matching, parameter extraction, middleware support, and secure dispatching.
ht2/couple
18 Downloads
Port of ryansmith94/couple from JS to PHP. A library for coupling two objects together. This is useful for nested pattern matching.
docile/routing
8 Downloads
Docile attribute and fluent router with pattern matching, URL generation, and middleware support.
bonfim/router
17 Downloads
A fast and powerful router that maps route callbacks to specific HTTP request methods and URIs. It supports parameters and pattern matching
guide42/traba
6 Downloads
An alternative to common pattern matching to route an URL to a resource
genai/validation
115 Downloads
Attribute-based validation compiled to a reflection-free validator. Put #[NotBlank]/#[Email]/#[Length]/#[Pattern]/#[Matches] on a #[Validate] form class; a build-time processor bakes the rules into Cache\Validation. At runtime, validate a populated form object -> a field=>error map, no reflection. PHP 5.3-safe runtime.
wildphp/module-antispam
10 Downloads
Automatically kick users when a message pattern is matched
php-regex/regex-psalm
0 Downloads
Psalm plugin that types $matches from the pattern of preg_match() and preg_match_all(), and reports the patterns your target PHP refuses.
alissonlinneker/statuspage-php-sdk
4 Downloads
# Code of Conduct Please don't abuse the API, and please report all feature requests and issues to https://support.atlassian.com/contact # Rate Limiting Each API token is limited to 1 request / second as measured on a 60 second rolling window. To get this limit increased, please contact us at https://support.atlassian.com/contact Error codes 420 or 429 indicate that you have exceeded the rate limit and the request has been rejected. # Basics ## HTTPS It's required ## URL Prefix In order to maintain version integrity into the future, the API is versioned. All calls currently begin with the following prefix: https://api.statuspage.io/v1/ ## RESTful Interface Wherever possible, the API seeks to implement repeatable patterns with logical, representative URLs and descriptive HTTP verbs. Below are some examples and conventions you will see throughout the documentation. * Collections are buckets: https://api.statuspage.io/v1/pages/asdf123/incidents.json * Elements have unique IDs: https://api.statuspage.io/v1/pages/asdf123/incidents/jklm456.json * GET will retrieve information about a collection/element * POST will create an element in a collection * PATCH will update a single element * PUT will replace a single element in a collection (rarely used) * DELETE will destroy a single element ## Sending Data Information can be sent in the body as form urlencoded or JSON, but make sure the Content-Type header matches the body structure or the server gremlins will be angry. All examples are provided in JSON format, however they can easily be converted to form encoding if required. Some examples of how to convert things are below: // JSON { "incident": { "name": "test incident", "components": ["8kbf7d35c070", "vtnh60py4yd7"] } } // Form Encoded (using curl as an example): curl -X POST https://api.statuspage.io/v1/example \ -d "incident[name]=test incident" \ -d "incident[components][]=8kbf7d35c070" \ -d "incident[components][]=vtnh60py4yd7" # Authentication
drupal-eca-recipe/eca_lib_0004
77 Downloads
Demonstrates how to express an if/elseif/else decision in an ECA model, the pattern people usually reach for when they want a PHP switch statement. ECA has neither a switch construct nor a working exclusive gateway, so the model uses the sentinel-default idiom instead: it assigns the default value up front, lets a matching branch overwrite it, and then, one hop downstream, tests whether the value is still the default in order to detect that nothing matched. Along the way it demonstrates the four-links-to-one-target OR idiom, in which several conditioned links leaving the same predecessor point at the same successor, so that any one of them is enough to run it.
matthiasmullie/minify
37011714 Downloads
CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.