i have problem with get my class function to which i send files from terminal. It's see that:
terminal: // php src/AppBundle/Provider/CommissionCost.php test.csv
in CommissionCost i want only put data to my function in Parser/CommissionDataParser.php
global $kernel;
$data = $kernel->getContainer()->get('data.parser')->getData($argv[1]);
var_dump($data);
//Uncaught Error: Call to a member function getContainer() on null
// this example i see in stackoverflow in topic about container : )
service:
services:
data.parser:
class: AppBundle\Parser\CommissionDataParser
arguments: ["@doctrine.orm.entity_manager"]