PHP Classes

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

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 101 All time: 9,795 This week: 455Up
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
Age: 36
All time rank: 19864 in Cuba Cuba
Week rank: 192 Up1 in Cuba Cuba Up
Innovation award
Innovation award
Nominee: 1x

Documentation

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 (4)  
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 (4)  /  src  
File Role Description
Files folder imageComponent (1 directory)

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

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

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

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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:101
This week:0
All time:9,795
This week:455Up