Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
d1d1cecc
Commit
d1d1cecc
authored
Apr 26, 2010
by
Roman S. Borschel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restored missing files.
parent
bff4f49b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
104 additions
and
2 deletions
+104
-2
PhpDriver.php
lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php
+71
-0
AbstractEntityInheritancePersister.php
...ine/ORM/Persisters/AbstractEntityInheritancePersister.php
+1
-1
AllTests.php
tests/Doctrine/Tests/ORM/Mapping/AllTests.php
+1
-1
PhpMappingDriverTest.php
tests/Doctrine/Tests/ORM/Mapping/PhpMappingDriverTest.php
+31
-0
No files found.
lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php
0 → 100644
View file @
d1d1cecc
<?php
/*
* $Id$
*
* 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 LGPL. For more information, see
* <http://www.doctrine-project.org>.
*/
namespace
Doctrine\ORM\Mapping\Driver
;
use
Doctrine\Common\Cache\ArrayCache
,
Doctrine\Common\Annotations\AnnotationReader
,
Doctrine\DBAL\Schema\AbstractSchemaManager
,
Doctrine\ORM\Mapping\ClassMetadataInfo
,
Doctrine\ORM\Mapping\MappingException
,
Doctrine\Common\Util\Inflector
,
Doctrine\ORM\Mapping\Driver\AbstractFileDriver
;
/**
* The PhpDriver includes php files which just populate ClassMetadataInfo
* instances with plain php code
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org
* @since 2.0
* @version $Revision$
* @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>
* @todo Rename: PHPDriver
*/
class
PhpDriver
extends
AbstractFileDriver
{
/**
* {@inheritdoc}
*/
protected
$_fileExtension
=
'.php'
;
protected
$_metadata
;
/**
* {@inheritdoc}
*/
public
function
loadMetadataForClass
(
$className
,
ClassMetadataInfo
$metadata
)
{
$this
->
_metadata
=
$metadata
;
$this
->
_loadMappingFile
(
$this
->
_findMappingFile
(
$className
));
}
/**
* {@inheritdoc}
*/
protected
function
_loadMappingFile
(
$file
)
{
$metadata
=
$this
->
_metadata
;
include
$file
;
}
}
\ No newline at end of file
lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php
View file @
d1d1cecc
...
...
@@ -37,7 +37,7 @@ abstract class AbstractEntityInheritancePersister extends BasicEntityPersister
*
* @var array
*/
/*private*/
protected
$_declaringClassMap
=
array
();
private
$_declaringClassMap
=
array
();
/**
* {@inheritdoc}
...
...
tests/Doctrine/Tests/ORM/Mapping/AllTests.php
View file @
d1d1cecc
...
...
@@ -23,7 +23,7 @@ class AllTests
$suite
->
addTestSuite
(
'Doctrine\Tests\ORM\Mapping\XmlMappingDriverTest'
);
$suite
->
addTestSuite
(
'Doctrine\Tests\ORM\Mapping\YamlMappingDriverTest'
);
$suite
->
addTestSuite
(
'Doctrine\Tests\ORM\Mapping\AnnotationDriverTest'
);
//$suite->addTestSuite('Doctrine\Tests\ORM\Mapping\PHPMappingDriverTest'); FILE MISSING!!!
$suite
->
addTestSuite
(
'Doctrine\Tests\ORM\Mapping\PHPMappingDriverTest'
);
$suite
->
addTestSuite
(
'Doctrine\Tests\ORM\Mapping\StaticPHPMappingDriverTest'
);
$suite
->
addTestSuite
(
'Doctrine\Tests\ORM\Mapping\ClassMetadataFactoryTest'
);
$suite
->
addTestSuite
(
'Doctrine\Tests\ORM\Mapping\ClassMetadataLoadEventTest'
);
...
...
tests/Doctrine/Tests/ORM/Mapping/PhpMappingDriverTest.php
0 → 100644
View file @
d1d1cecc
<?php
namespace
Doctrine\Tests\ORM\Mapping
;
use
Doctrine\ORM\Mapping\ClassMetadata
,
Doctrine\ORM\Mapping\Driver\PhpDriver
,
Doctrine\ORM\Tools\Export\ClassMetadataExporter
;
require_once
__DIR__
.
'/../../TestInit.php'
;
class
PhpMappingDriverTest
extends
AbstractMappingDriverTest
{
protected
function
_loadDriver
()
{
$path
=
__DIR__
.
DIRECTORY_SEPARATOR
.
'php'
;
/*
// Convert YAML mapping information to PHP
// Uncomment this code if the YAML changes and you want to update the PHP code
// for the same mapping information
$cme = new ClassMetadataExporter();
$cme->addMappingSource(__DIR__ . DIRECTORY_SEPARATOR . 'yaml');
$exporter = $cme->getExporter('php', $path);
$exporter->setMetadatas($cme->getMetadatas());
$exporter->export();
*/
return
new
PhpDriver
(
$path
);
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment