Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update Propel filename output.

Signed-off-by: Toha <tohenk@yahoo.com>
  • Loading branch information...
commit 05fc8fb7b512ddd8e2a5d6185f43599f53739091 1 parent 6334ccd
@tohenk tohenk authored
View
2  lib/MwbExporter/Formatter/Propel1/Xml/Formatter.php
@@ -39,7 +39,7 @@ protected function init()
$this->setDatatypeConverter(new DatatypeConverter());
$this->addConfigurations(array(
static::CFG_INDENTATION => 4,
- static::CFG_FILENAME => '%s.schema.xml',
+ static::CFG_FILENAME => '%schema%.schema.xml',
static::CFG_NAMESPACE => '',
static::CFG_ADD_VENDOR => false,
));
View
7 lib/MwbExporter/Formatter/Propel1/Xml/Model/Schema.php
@@ -29,7 +29,6 @@
use MwbExporter\Model\Schema as BaseSchema;
use MwbExporter\Writer\WriterInterface;
-use MwbExporter\Formatter\Propel1\Xml\Formatter;
class Schema extends BaseSchema
{
@@ -39,12 +38,8 @@ class Schema extends BaseSchema
*/
public function write(WriterInterface $writer)
{
- $fmt = $this->getDocument()->getConfig()->get(Formatter::CFG_FILENAME);
- if (false === strpos($fmt, '%s')) {
- $fmt = '%s.'.$fmt;
- }
$writer
- ->open(sprintf($fmt, $this->getName()))
+ ->open($this->getDocument()->translateFilename($this))
->write('<?xml version="1.0" encoding="UTF-8"?>')
->write('<database name="%s" defaultIdMethod="native">', $this->getName())
->writeCallback(function(WriterInterface $writer, Schema $_this = null) {
Please sign in to comment.
Something went wrong with that request. Please try again.