public function __construct(ProductFromCsv $product_from_csv) { if (!array_key_exists('argv',$GLOBALS) || !array_key_exists(1, $GLOBALS['argv'])) { throw new Exception('Missing description to parse'); } if (!array_key_exists('argv',$GLOBALS) || !array_key_exists(2, $GLOBALS['argv'])) { throw new Exception('Missing brand to parse'); } if (!array_key_exists('argv',$GLOBALS) || !array_key_exists(3, $GLOBALS['argv'])) { throw new Exception('Missing procuct code'); } if (!array_key_exists('argv',$GLOBALS) || !array_key_exists(4, $GLOBALS['argv'])) { throw new Exception('Missing procuct description'); } parent::__construct($product_from_csv); $this->data['DESCRIZIONE']=$GLOBALS['argv'][1]; $this->data['MARCA']=$GLOBALS['argv'][2]; $this->data['COD.PRODOTTO']=$GLOBALS['argv'][3]; $this->data['VENDITA']='10'; $this->data['IVA']='22'; $this->data['ESISTENZA']='1'; $this->data['IMPEGNATO']='0'; $this->data['FOTO_ARTICOLO']=''; $this->data['EAN13']='8003670365679'; $this->data['LOCAZIONE_MAG']='1'; $this->data['REPARTO']='15.2'; $this->data['TESTO']=$GLOBALS['argv'][4]; }