1
0
mirror of synced 2025-02-20 22:23:14 +03:00

Removing AbstractFileDriver, using Doctrine\Common\Persistence\Mapping\Driver\FileDriver instead

This commit is contained in:
Marco Pivetta 2012-01-17 18:33:50 +01:00
parent e9e36dcf32
commit 245718c9eb
5 changed files with 8 additions and 52 deletions

View File

@ -1,42 +0,0 @@
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the MIT license. For more information, see
* <http://www.doctrine-project.org>.
*/
namespace Doctrine\ORM\Mapping\Driver;
use Doctrine\Common\Persistence\Mapping\Driver\FileDriver;
/**
* Base driver for file-based metadata drivers.
*
* A file driver operates in a mode where it loads the mapping files of individual
* classes on demand. This requires the user to adhere to the convention of 1 mapping
* file per class and the file names of the mapping files must correspond to the full
* class name, including namespace, with the namespace delimiters '\', replaced by dots '.'.
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.com
* @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan H. Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/
abstract class AbstractFileDriver extends FileDriver
{
}

View File

@ -20,7 +20,7 @@
namespace Doctrine\ORM\Mapping\Driver;
use Doctrine\Common\Persistence\Mapping\ClassMetadata,
Doctrine\ORM\Mapping\Driver\AbstractFileDriver;
Doctrine\Common\Persistence\Mapping\Driver\FileDriver;
/**
* The PHPDriver includes php files which just populate ClassMetadata
@ -36,7 +36,7 @@ use Doctrine\Common\Persistence\Mapping\ClassMetadata,
* @author Roman Borschel <roman@code-factory.org>
* @todo Rename: PHPDriver
*/
class PHPDriver extends AbstractFileDriver
class PHPDriver extends FileDriver
{
const DEFAULT_FILE_EXTENSION = '.php';

View File

@ -20,6 +20,7 @@
namespace Doctrine\ORM\Mapping\Driver;
use SimpleXMLElement,
Doctrine\Common\Persistence\Mapping\Driver\FileDriver,
Doctrine\Common\Persistence\Mapping\ClassMetadata,
Doctrine\ORM\Mapping\MappingException;
@ -34,7 +35,7 @@ use SimpleXMLElement,
* @author Jonathan H. Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/
class XmlDriver extends AbstractFileDriver
class XmlDriver extends FileDriver
{
const DEFAULT_FILE_EXTENSION = '.dcm.xml';

View File

@ -20,6 +20,7 @@
namespace Doctrine\ORM\Mapping\Driver;
use Doctrine\Common\Persistence\Mapping\ClassMetadata,
Doctrine\Common\Persistence\Mapping\Driver\FileDriver,
Doctrine\ORM\Mapping\MappingException,
Symfony\Component\Yaml\Yaml;
@ -32,7 +33,7 @@ use Doctrine\Common\Persistence\Mapping\ClassMetadata,
* @author Jonathan H. Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/
class YamlDriver extends AbstractFileDriver
class YamlDriver extends FileDriver
{
const DEFAULT_FILE_EXTENSION = '.dcm.yml';

View File

@ -19,14 +19,10 @@
namespace Doctrine\ORM\Tools\Console\Command\SchemaTool;
use Symfony\Component\Console\Input\InputArgument,
Symfony\Component\Console\Input\InputOption,
Symfony\Component\Console\Input\InputInterface,
use Symfony\Component\Console\Input\InputInterface,
Symfony\Component\Console\Output\OutputInterface,
Symfony\Component\Console\Command\Command,
Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper,
Doctrine\ORM\Tools\SchemaTool,
Doctrine\ORM\Mapping\Driver\AbstractFileDriver;
Doctrine\ORM\Tools\SchemaTool;
abstract class AbstractCommand extends Command
{