-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seed? #4
Comments
The seed is not in use currently but it will be used for: |
What does it do exactly? |
The idea of So you could build your own pattern with the fluent interface as you'll do most of the time but there may be times when you may wish to pass along your own regular expression pattern, one case might be when running unit tests or testing output when a fluently built pattern isn't doing what you expect. $flux = new namespace\Flux;
$flux->startOfLine()->anything()->endOfLine(); // Pattern /^(.*)$/
$flux->match( 'Anything but a new line!' ); // Uses the pattern built above
$flux->match( 'Anything but a new line!', '/^(.*)$/' ); // Uses the seed |
Oh I see. So you could validate the seeds regex using this. |
~- Fixes internal namespace conflict - Changes namespace from Sortiz\Tools to SelvinOrtiz\Utils\Flux - Adds composer support [Issue #3](#3) - Adds the addSeed() and removeSeed() methods [Issue #4](#4) - Adds the getInstance() static method - Adds FluxUrlExample.php, FluxDateExample.php, and FluxPhoneExample.php - Adds getSeed() to get the seed without forcing __toString on the object - Adds getSegment() to extract a segment (capturing group) from the pattern - Implements unit tests (60% coverage) [Issue #3](#3) - Implements Full PSR-2 Compliance (Tabs over Spaces) - Enables the seed on match() and replace() [Issue #4](#4) - Removes example.php and defines them elsewhere - Moves examples into /etc and defines one example per file - Other small fixes and additions
I've added this to my port now too. |
@jbrooksuk Awesome: ) |
What does the seed do? It's default is
false
but there is no way of overwriting it. It's not changed anywhere, so is it needed?The text was updated successfully, but these errors were encountered: