Data Sources ============ The Psi grid depends on the `Psi Object Agent`_ component to provide data. The Object Agent component provides backends for Doctrine ORM, Doctrine PHPCR ODM, and the Doctrine Collections library (which is primarily useful for testing purposes). What is more, through the use of the ``AgentFinder`` class, the grid system can support many data sources in a single factory instance. The following sections demonstrate how to instantiate the grid using each of these systems. In this section we will assume that you are using the :ref:`annotations reference`. Doctrine ORM ------------ .. code-block:: php addAnnotationDriver() ->createGridFactory(); Doctrine PHPCR ODM ------------------ .. code-block:: php addAnnotationDriver() ->createGridFactory(); Doctrine Collections -------------------- .. code-block:: php [ new Article('foobar'), new Article('barfoo'), // ... ] ]) ]); $gridFactory = GridFactoryBuilder::createWithDefaults($agentFinder) ->addAnnotationDriver() ->createGridFactory();