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());
    }
 public function getModelName()
 {
     if ($this->isExternal()) {
         return $this->getRawTableName();
     } else {
         return parent::getModelName();
     }
 }