MailerDiscoveryService
in package
Service for discovering Mailer classes and their methods using reflection
Table of Contents
Methods
- discoverAllMailers() : array<string|int, mixed>
- Discover all Mailer classes in the application and plugins
- getMailerInfo() : array<string|int, mixed>|null
- Get information about a specific mailer class
- getMailerMethodInfo() : array<string|int, mixed>|null
- Get information about a specific mailer method
- analyzeMailerClass() : array<string|int, mixed>
- Analyze a mailer class and extract method information
- analyzeMailerMethod() : array<string|int, mixed>
- Analyze a mailer method and extract parameter and view var information
- discoverMailersInNamespace() : array<string|int, mixed>
- Discover mailers in a specific namespace
- discoverPluginMailers() : array<string|int, mixed>
- Discover mailers in all plugins
- extractSubjectFromMethod() : string|null
- Extract subject from method by analyzing source code
- extractViewVarsFromMethod() : array<string|int, mixed>
- Extract view vars from method by analyzing source code
- generateVarDescription() : string
- Generate a human-readable description for a variable name
Methods
discoverAllMailers()
Discover all Mailer classes in the application and plugins
public
discoverAllMailers() : array<string|int, mixed>
Return values
array<string|int, mixed> —Array of mailer information
getMailerInfo()
Get information about a specific mailer class
public
getMailerInfo(string $className) : array<string|int, mixed>|null
Parameters
- $className : string
Return values
array<string|int, mixed>|nullgetMailerMethodInfo()
Get information about a specific mailer method
public
getMailerMethodInfo(string $className, string $methodName) : array<string|int, mixed>|null
Parameters
- $className : string
- $methodName : string
Return values
array<string|int, mixed>|nullanalyzeMailerClass()
Analyze a mailer class and extract method information
protected
analyzeMailerClass(string $className, ReflectionClass $reflection) : array<string|int, mixed>
Parameters
- $className : string
-
Fully qualified class name
- $reflection : ReflectionClass
-
Reflection instance
Return values
array<string|int, mixed>analyzeMailerMethod()
Analyze a mailer method and extract parameter and view var information
protected
analyzeMailerMethod(string $className, ReflectionMethod $method) : array<string|int, mixed>
Parameters
- $className : string
-
Mailer class name
- $method : ReflectionMethod
-
Method reflection
Return values
array<string|int, mixed>discoverMailersInNamespace()
Discover mailers in a specific namespace
protected
discoverMailersInNamespace(string $namespace, string $path) : array<string|int, mixed>
Parameters
- $namespace : string
-
The namespace to search
- $path : string
-
The filesystem path to search
Return values
array<string|int, mixed>discoverPluginMailers()
Discover mailers in all plugins
protected
discoverPluginMailers() : array<string|int, mixed>
Return values
array<string|int, mixed>extractSubjectFromMethod()
Extract subject from method by analyzing source code
protected
extractSubjectFromMethod(ReflectionMethod $method) : string|null
Parameters
- $method : ReflectionMethod
Return values
string|nullextractViewVarsFromMethod()
Extract view vars from method by analyzing source code
protected
extractViewVarsFromMethod(ReflectionMethod $method) : array<string|int, mixed>
Parameters
- $method : ReflectionMethod
Return values
array<string|int, mixed>generateVarDescription()
Generate a human-readable description for a variable name
protected
generateVarDescription(string $varName) : string
Parameters
- $varName : string