sfDoctrineTableGetterPlugin - 1.2.0
Code Completion support for Doctrine Table Getters
You are currently browsing
the website for symfony 1
This plugin enables to have code completion support for Doctrine table accesses in your favorite Integrated development environment (IDE). Just install the plugin, run doctrine:build task and you are up!
This plugin makes it possible to have code completion for doctrine tables in your favorite IDE. The native design of Doctrine doesn't permit to know return types of a call like Doctrine::getTable('User'), therefore IDE's cannot spot what the return type is.
However, this plugin fires up right after every doctrine:build task run and generates a file which includes explicit definitions (phpdoc) for each table.
|Alaattin Kahramanlar||lead||rt.moc.ty <<ta>> ralnamarhak.nittaala|
Copyright (C) 2011, Yonca Teknoloji
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
sfDoctrineTableGetterPlugin packages a very much desired but not yet implemented
missing feature of Doctrine ORM: Code completion
Doctrine built-in table getter method, getTable() - by design - lacks proper phpdoc for each database table in your database which are required for all Integrated development environments (IDE).
sfDoctrineTableGetterPlugin, addresses this missing feature by a seamless and tight integration with native doctrine tasks. After each execution of these (documented below) doctrine tasks, plugin regenerates its auto-generated table-getter class to be in sync with project schema.
Install the plugin
$ symfony plugin:install sfDoctrineTableGetterPlugin
Clear the cache
$ symfony cache:clear
To get (for example) City table use following:
which is equivalent to this native doctrine call:
Plugin regenerates it's auto-generated getter class after execution of following tasks:
If you want to contribute to this plugin, you can contact me by my listed email address, I'll review your contribution and try to plan in upcoming versions.