\Dewdrop\BootstrapDetector

This class tracks down the bootstrap for your application and grabs the Pimple object from it. This is used in all the primary execution scripts in your Dewdrop project (i.e. The main PHP file in your doc root for a Silex app, the root plugin file in a WP project, the phpunit bootstrap, and the CLI runner).

Summary

Methods
Properties
Constants
findPimple()
validatePimple()
augmentPimpleWithDefaultResources()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

findPimple()

findPimple() : \Pimple

Load the application's bootstrap and retrieve the Pimple DI object from it. Your Pimple object must provide some basic resources to work with Dewdrop.

Returns

\Pimple

validatePimple()

validatePimple(\Pimple  $pimple) : void

Ensure the Pimple found via the application's bootstrap provides the resources needed for Dewdrop to run properly. At a minimum, the Pimple should have:

1) A "config" resource that provides an array matching this format:

'config' => [ 'db' => [ 'type' => 'pgsql' or 'mysql' ] ]

2) A "db" resources that provides a \Dewdrop\Db\Adapter object.

Parameters

\Pimple $pimple

augmentPimpleWithDefaultResources()

augmentPimpleWithDefaultResources(\Pimple  $pimple) : void

If the Pimple object doesn't provide definitions for some basic resources, add default definitions for those resources.

Parameters

\Pimple $pimple