Database Setup
The Spot\Locator
object is the main point of access to spot that you will
have to be able to access from everywhere you need to run queries or work with
your entities. It is responsible for loading mappers and manging configuration.
To create a Locator, you will need a Spot\Config
object.
The Spot\Config
object stores and references database connections by name.
Create a new instance of Spot\Config
and add database connections with
DSN strings so Spot can establish a database connection, then create your
locator object:
Creating a Config Object
You can also use DBAL-compatible configuration arrays instead of DSN strings if you prefer: