PHP Classes
elePHPant
Icontem

Doctrine Dot Naming Strategy: Set a naming strategy for Doctring mapping dots

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-07-02 (1 year ago) RSS 2.0 feedNot yet rated by the usersTotal: 94 All time: 8,482 This week: 1,113Up
Version License PHP version Categories
dot-naming-strategy 0.1MIT/X Consortium ...5.4PHP 5, Databases, Design Patterns
Description Author

This class sets a naming strategy for Doctring mapping dots.

It extends the Doctrine NamingStrategy class to define how to map between database table names and property fields.

Basically it maps dots to underscores. It may also change the case of fields to upper or lower case.

Innovation Award
PHP Programming Innovation award nominee
August 2015
Number 9
Doctrine is a PHP Object-Relational Mapping package that is used by PHP developers to store and retrieve objects in databases.

It provides means to define how objects and properties are mapped to database tables and fields.

This class implements a common mapping strategy for used with Doctrine ORM to map objects to table and field names.

Manuel Lemos
Picture of Rafael Espinosa
  Performance   Level  
Name: Rafael Espinosa <contact>
Classes: 6 packages by
Country: Cuba Cuba
Innovation award
Innovation award
Nominee: 1x

Details

Doctrine ORM DotNamingStrategy

Automatic table names conversion from schema.name to schema_name, ie. change database connection from postgresql to mysql.

Symfony2

You must set this class as service in container

<parameters>
    <parameter key="doctrine.orm.naming_strategy.dot.class">Fluency\Component\Doctrine\ORM\Mapping\DotNamingStrategy</parameter>
</parameters>
<services>
...
<service id="doctrine.orm.naming_strategy.dot"
    class="%doctrine.orm.naming_strategy.dot.class%" public="false" />
...
</services>

Orm settings

...
orm:
    auto_generate_proxy_classes: %kernel.debug%
#        auto_mapping: true
    default_entity_manager: default
    entity_managers:
        default:
            connection: default
            naming_strategy: doctrine.orm.naming_strategy.dot
...
  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. Auxiliary data
Accessible without login Plain text file README.md Doc. Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageComponent (1 directory)

  Files folder image Files  /  src  /  Component  
File Role Description
Files folder imageDoctrine (1 directory)

  Files folder image Files  /  src  /  Component  /  Doctrine  
File Role Description
Files folder imageORM (1 directory)

  Files folder image Files  /  src  /  Component  /  Doctrine  /  ORM  
File Role Description
Files folder imageMapping (1 file)

  Files folder image Files  /  src  /  Component  /  Doctrine  /  ORM  /  Mapping  
File Role Description
  Plain text file DotNamingStrategy.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:94
This week:0
All time:8,482
This week:1,113Up