public function addTable(\MwbExporter\Core\Model\Table $table)
    {
        $schemaName = $table->getSchemaName();
        $tableName  = $table->getRawTableName();
        if (isset($this->config['filename']) && $this->config['filename'])
        {
            $searched = array('%schema%', '%table%', '%entity%', '%extension%');
            $replaced = array($schemaName, $tableName, $table->getModelName(), $this->saveFormat);
            $fileName = str_replace(
                $searched,
                $replaced,
                $this->config['filename']
            );

            if (false !== strpos($fileName, '%'))
            {
                throw new \Exception(sprintf('All filename variable where not converted. Perhaps a misstyped name (%s) ?', substr($fileName, strpos($fileName, '%'), strrpos($fileName, '%'))));
            }
        }
        else
        {
            $fileName   = $schemaName . '.' . $tableName . '.' . $this->saveFormat;
        }

        $this->zip->addFromString($fileName, $table->display());
    }
 /**
  *
  * @param SimpleXMLElement $data
  * @param type $parent 
  */
 public function __construct($data, $parent)
 {
     $config = \MwbExporter\Core\Registry::get('config');
     $this->tablePrefix = $config['tablePrefix'];
     $this->parentTable = $config['parentTable'];
     
     parent::__construct($data, $parent);
 }
 public function getModelName()
 {
     if ($this->isExternal()) {
         return $this->getRawTableName();
     } else {
         return parent::getModelName();
     }
 }
 public function __construct($data, $parent)
 {
     parent::__construct($data, $parent);
 }