Changeset 1338 for trunk/experiments/people
- Timestamp:
- 02/11/08 17:31:58 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/experiments/people/mikey/filterAPI/filterAPI.php
r1334 r1338 1 1 <?php 2 /**3 * @todo make PasswordFilter more fluent4 * @todo remove min length from PasswordFilter constructor (use LengthFilterDecorator instead?)5 * @todo remove encoding feature from PasswordFilter, use EncodingFilterDecorator instead6 */7 8 2 $filter = stubFilterFactory::forType('integer')->inRange(1, 4)->asRequired(); 9 3 $filter = stubFilterFactory::forType('integer')->using(new MyRVEFactory())->inRange(1, 4)->asRequired(); … … 13 7 $filter = stubFilterFactory::forType('string')->length(2, 5)->validatedBy(new stubRegexValidator($regex))->defaultsTo('foo'); 14 8 15 $password = stubFilterFactory::forType('password', array($rveFactory))-> minLength(5)->minDiffChars(3)->nonAllowedValues(array(1, 2, 3))->encodedWith(new stubMd5Encoder());9 $password = stubFilterFactory::forType('password', array($rveFactory))->length(5, null)->minDiffChars(3)->nonAllowedValues(array(1, 2, 3))->encodedWith(new stubMd5Encoder()); 16 10 17 11 $http = stubFilterFactory::forType('http', array($rveFactory))->checkDNS(true);
