Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 501 Bytes

using.rst

File metadata and controls

21 lines (14 loc) · 501 Bytes

Using

You can use Mandango in a normal way.

You can access to the mandango in the container:

$mandango = $container->get('mandango');

The mandango is initialized also automatically (in a lazy way) if you use some functionality in the documents that require it:

// creating
$article = $mandango->create('Model\Article');
$article->setTitle($title);
$article->save();

// quering
$articles = $mandango->getRepository('Model\Article')->createQuery();

// ...