PHP code example of adtechpotok / symfony-aware

1. Go to this page and download the library: Download adtechpotok/symfony-aware library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

adtechpotok / symfony-aware example snippets




use Adtechpotok\Aware\Interfaces\EntityManagerAwareInterface;
use Adtechpotok\Aware\Traits\EntityManagerAwareTrait;

class SomeClass implements EntityManagerAwareInterface
{
    use EntityManagerAwareTrait;
    
    public function someMethod()
    {
        dump($this->em); // $em - дефолтный EntityManager, аналог '@doctrine.orm.default_entity_manager'
    }
}