sfPluginConfiguration
in package
sfPluginConfiguration stub for standalone Heratio mode.
Provides the abstract base class that ALL plugin Configuration classes extend. Required because every plugin has a Configuration class like:
class ahgThemeB5PluginConfiguration extends sfPluginConfiguration { ... }
Without this stub, PHP fatals on class load when Symfony is absent.
API-compatible with vendor/symfony/lib/config/sfPluginConfiguration.class.php. In dual-stack mode (Symfony present), the real sfPluginConfiguration is loaded by sfCoreAutoload and this file is never included.
Safety: The real constructor checks if (!$this->configuration instanceof sfApplicationConfiguration) before calling initializeAutoload()/initialize().
In standalone mode, sfApplicationConfiguration doesn't exist, so PHP's
instanceof returns false → !false = true → both methods always run.
This is correct behavior — we WANT plugin initialization in standalone mode.
Table of Contents
Methods
- __construct() : mixed
- Constructor — matches real sfPluginConfiguration signature exactly.
- configure() : mixed
- Configures the plugin.
- connectTests() : mixed
- Connects the current plugin's tests to the "test:*" tasks.
- filterAutoloadConfig() : array<string|int, mixed>
- Filters sfAutoload configuration values.
- filterTestFiles() : array<string|int, mixed>
- Listens for the "task.test.filter_test_files" event.
- getName() : string
- Returns the plugin name.
- getRootDir() : string
- Returns the plugin root directory.
- initialize() : mixed
- Initializes the plugin.
- initializeAutoload() : mixed
- Initializes autoloading for the plugin.
- setup() : mixed
- Sets up the plugin.
Methods
__construct()
Constructor — matches real sfPluginConfiguration signature exactly.
public
__construct(sfProjectConfiguration $configuration[, string|null $rootDir = null ][, string|null $name = null ]) : mixed
Parameters
- $configuration : sfProjectConfiguration
-
The project configuration
- $rootDir : string|null = null
-
The plugin root directory
- $name : string|null = null
-
The plugin name
configure()
Configures the plugin.
public
configure() : mixed
Called before autoloading — classes may not be available yet.
connectTests()
Connects the current plugin's tests to the "test:*" tasks.
public
connectTests() : mixed
No-op in standalone mode — test tasks are Symfony CLI only.
filterAutoloadConfig()
Filters sfAutoload configuration values.
public
filterAutoloadConfig(sfEvent $event, array<string|int, mixed> $config) : array<string|int, mixed>
Parameters
- $event : sfEvent
- $config : array<string|int, mixed>
Return values
array<string|int, mixed>filterTestFiles()
Listens for the "task.test.filter_test_files" event.
public
filterTestFiles(sfEvent $event, array<string|int, mixed> $files) : array<string|int, mixed>
No-op in standalone mode — test tasks are Symfony CLI only.
Parameters
- $event : sfEvent
- $files : array<string|int, mixed>
Return values
array<string|int, mixed>getName()
Returns the plugin name.
public
getName() : string
Return values
stringgetRootDir()
Returns the plugin root directory.
public
getRootDir() : string
Return values
stringinitialize()
Initializes the plugin.
public
initialize() : mixed
Called after autoloading — all classes are available.
initializeAutoload()
Initializes autoloading for the plugin.
public
initializeAutoload() : mixed
Uses sfSimpleAutoload to scan the plugin's lib/ directory.
setup()
Sets up the plugin.
public
setup() : mixed
Called before configure(). Base plugins can override for shared setup.