How robvanaarle/php-object-seam works
Main Components
a. Core Components:
• ObjectSeam Manager
• Code Generation System
• Method Interception Layer
• Test Integration Layer
b. Supporting Components:
• Method Signature Processing
• Call Capture System
• Constructor Management
• Static Method Handler
Test Layer (Entry Point)
Object Seam Layer
Code Generation Layer
Target Class Layer
Test Integration Components
• CreatesObjectSeams trait as the main entry point
• To ObjectSeam builder system
• Test framework integration points
Core ObjectSeam Components
• Builder pattern implementation
• ClassSeam and ObjectSeamTrait relationships
• Method interception flow
Code Generation System
• MethodSignatureBuilder
• CodeBuilder components
• Seam generation process
Use these specific visual elements:
Key Architectural Patterns to Highlight:
Builder Pattern
CreatesObjectSeams → Builder → ObjectSeam
Method Interception Flow
ObjectSeam → MethodSignatureBuilder → CodeBuilder → Generated Seam
Test Integration
Test Class → CreatesObjectSeams → ObjectSeam → Target Class
Important Implementation Details:
Seam creation process
• Method signature analysis
• Code generation
• Runtime method interception
Features
• Protected/private method access
• Method overriding
• Constructor customization
• Call capturing
Support for
• Static methods
• Multiple PHP versions (7.0-8.2)
• Various method signatures
Additional Considerations:
Notes for
• PHP version compatibility
• Test framework integration
• Legacy code interaction
Extension points
• Custom method handling
• New PHP version support
• Additional seam types