Repository navigation
EntityTag
Viames Marino edited this page Nov 6, 2026
·
1 revision
Pair\Http\EntityTag implements RFC 9110 conditional requests.
-
parse(string $value): array: complete entity-tag lists, weak tags and the standalone wildcard. Malformed syntax throwsInvalidArgumentException. -
evaluate(string $method, ?string $etag, ?string $ifMatch, ?string $ifNoneMatch, bool $exists = true): int: return 200 to proceed, 304 for a matching conditional GET/HEAD, or 412 for a failed precondition.
If-Match uses strong comparison and is evaluated before weak If-None-Match. Wildcard tests existence only; it is not a revision lock. Pass exists=false for a missing representation and etag=null if no validator was assigned. Dates and ranges are outside this helper.
Authenticate, authorize and perform normal request checks first. For writes, evaluate against the actual selected representation under the same concurrency boundary as the mutation. Checking a tag outside the write transaction does not prevent lost updates.
Maintained by Viames Marino — VM Ingegneria · Professional enquiries
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js, PairMotion.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4