Methods (4)
\Sillbeam\Core\Architecture\DiscoveryOptions::__construct()Normalizes roots and rejects conflicting namespaces for the same path.
public function __construct(
string $root,
public string $namespace,
?array $moduleRoots = null,
?array $projectRoots = null,
public array $excludes = [],
public array $controllerPatterns = ['Controller', '**/Controller'],
public array $entityPatterns = ['Entity', '**/Entity'],
public array $serviceExcludes = ['Entity/**', '**/Entity/**', 'Dto/**', '**/Dto/**', 'Tests/**', '**/Tests/**', 'Fixtures/**', '**/Fixtures/**', 'Migrations/**', '**/Migrations/**'],
public array $applicationRoots = [],
)
- Element kind
- method
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- PHPDoc metadata
- Name
- param
- Description
- explicit module roots; null selects the application root plus /Module, an empty list disables shared-module roots
- Type
- list<\Sillbeam\Core\Architecture\DiscoveryRoot>|null
- Variable
- moduleRoots
- Name
- param
- Description
- explicit Project roots; null selects the application root plus /Project, an empty list disables Project roots
- Type
- list<\Sillbeam\Core\Architecture\DiscoveryRoot>|null
- Variable
- projectRoots
- Name
- param
- Description
- global absolute or application-root-relative glob-like exclusion patterns
- Type
- list<string>
- Variable
- excludes
- Name
- param
- Description
- area-relative patterns used to discover controller directories
- Type
- list<string>
- Variable
- controllerPatterns
- Name
- param
- Description
- area-relative patterns used to discover entity directories
- Type
- list<string>
- Variable
- entityPatterns
- Name
- param
- Description
- additional Composer namespace/path mappings for reference classification, not recursive scanning
- Type
- list<\Sillbeam\Core\Architecture\DiscoveryRoot>
- Variable
- applicationRoots
- Name
- param
- Description
- area-relative patterns excluded from automatic service registration
- Type
- list<string>
- Variable
- serviceExcludes
- Name
- param
- Description
- application source root
- Type
- string
- Variable
- root
- Name
- param
- Description
- PSR-4 namespace prefix for the application source root
- Type
- string
- Variable
- namespace
- Name
- throws
- Description
- if the same discovery path has conflicting namespace mappings
- Type
- \LogicException
- Visibility
- public
- Parameters
- Name
- root
- Type
- string
- Description
- application source root
- By reference
- No
- Variadic
- No
- Name
- namespace
- Type
- string
- Description
- PSR-4 namespace prefix for the application source root
- By reference
- No
- Variadic
- No
- Name
- moduleRoots
- Type
- list<\Sillbeam\Core\Architecture\DiscoveryRoot>|null
- Description
- explicit module roots; null selects the application root plus /Module, an empty list disables shared-module roots
- Default value
- null
- By reference
- No
- Variadic
- No
- Name
- projectRoots
- Type
- list<\Sillbeam\Core\Architecture\DiscoveryRoot>|null
- Description
- explicit Project roots; null selects the application root plus /Project, an empty list disables Project roots
- Default value
- null
- By reference
- No
- Variadic
- No
- Name
- excludes
- Type
- list<string>
- Description
- global absolute or application-root-relative glob-like exclusion patterns
- Default value
- []
- By reference
- No
- Variadic
- No
- Name
- controllerPatterns
- Type
- list<string>
- Description
- area-relative patterns used to discover controller directories
- Default value
- ['Controller', '**/Controller']
- By reference
- No
- Variadic
- No
- Name
- entityPatterns
- Type
- list<string>
- Description
- area-relative patterns used to discover entity directories
- Default value
- ['Entity', '**/Entity']
- By reference
- No
- Variadic
- No
- Name
- serviceExcludes
- Type
- list<string>
- Description
- area-relative patterns excluded from automatic service registration
- Default value
- ['Entity/**', '**/Entity/**', 'Dto/**', '**/Dto/**', 'Tests/**', '**/Tests/**', 'Fixtures/**', '**/Fixtures/**', 'Migrations/**', '**/Migrations/**']
- By reference
- No
- Variadic
- No
- Name
- applicationRoots
- Type
- list<\Sillbeam\Core\Architecture\DiscoveryRoot>
- Description
- additional Composer namespace/path mappings for reference classification, not recursive scanning
- Default value
- []
- By reference
- No
- Variadic
- No
- Return value
- Type
- mixed
- Exceptions
- Type
- \LogicException
- Description
- if the same discovery path has conflicting namespace mappings
- abstract
- No
- final
- No
- static
- No
\Sillbeam\Core\Architecture\DiscoveryOptions::excluded()Tests normalized absolute or application-relative paths and root-local exclusion patterns.
public function excluded(string $file): bool
- Element kind
- method
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- Visibility
- public
- Parameters
- Name
- file
- Type
- string
- By reference
- No
- Variadic
- No
- Return value
- Type
- bool
- abstract
- No
- final
- No
- static
- No
\Sillbeam\Core\Architecture\DiscoveryOptions::namespaceForDirectory()Derives a namespace using the longest configured containing root.
public function namespaceForDirectory(string $directory): string
- Element kind
- method
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- PHPDoc metadata
- Name
- throws
- Description
- if no configured root contains the directory
- Type
- \LogicException
- Visibility
- public
- Parameters
- Name
- directory
- Type
- string
- By reference
- No
- Variadic
- No
- Return value
- Type
- string
- Exceptions
- Type
- \LogicException
- Description
- if no configured root contains the directory
- abstract
- No
- final
- No
- static
- No
\Sillbeam\Core\Architecture\DiscoveryOptions::roots()Returns the application source root followed by module and Project roots.
Additional applicationRoots classify referenced application types; they are not scan roots.
public function roots(): array
- Element kind
- method
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- PHPDoc metadata
- Name
- return
- Type
- list<\Sillbeam\Core\Architecture\DiscoveryRoot>
- Visibility
- public
- Return value
- Type
- list<\Sillbeam\Core\Architecture\DiscoveryRoot>
- abstract
- No
- final
- No
- static
- No
Properties (9)
\Sillbeam\Core\Architecture\DiscoveryOptions::$applicationRoots- Element kind
- property
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- Visibility
- public
- Type
- array
- Default value
- []
\Sillbeam\Core\Architecture\DiscoveryOptions::$controllerPatterns- Element kind
- property
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- Visibility
- public
- Type
- array
- Default value
- ['Controller', '**/Controller']
\Sillbeam\Core\Architecture\DiscoveryOptions::$entityPatterns- Element kind
- property
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- Visibility
- public
- Type
- array
- Default value
- ['Entity', '**/Entity']
\Sillbeam\Core\Architecture\DiscoveryOptions::$excludes- Element kind
- property
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- Visibility
- public
- Type
- array
- Default value
- []
\Sillbeam\Core\Architecture\DiscoveryOptions::$moduleRoots- Element kind
- property
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- PHPDoc metadata
- Name
- var
- Type
- list<\Sillbeam\Core\Architecture\DiscoveryRoot>
- Visibility
- public
- Type
- list<\Sillbeam\Core\Architecture\DiscoveryRoot>
\Sillbeam\Core\Architecture\DiscoveryOptions::$namespace- Element kind
- property
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- Visibility
- public
- Type
- string
\Sillbeam\Core\Architecture\DiscoveryOptions::$projectRoots- Element kind
- property
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- PHPDoc metadata
- Name
- var
- Type
- list<\Sillbeam\Core\Architecture\DiscoveryRoot>
- Visibility
- public
- Type
- list<\Sillbeam\Core\Architecture\DiscoveryRoot>
\Sillbeam\Core\Architecture\DiscoveryOptions::$root- Element kind
- property
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- Visibility
- public
- Type
- string
\Sillbeam\Core\Architecture\DiscoveryOptions::$serviceExcludes- Element kind
- property
- Declaring type
- \Sillbeam\Core\Architecture\DiscoveryOptions
- Visibility
- public
- Type
- array
- Default value
- ['Entity/**', '**/Entity/**', 'Dto/**', '**/Dto/**', 'Tests/**', '**/Tests/**', 'Fixtures/**', '**/Fixtures/**', 'Migrations/**', '**/Migrations/**']