sfDoctrineTableGetterPlugin
1.0.5stable
for sf 1.4sf 1.3sf 1.2 and Doctrine
MIT
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.
Features
- Works right after 'sfDoctrineBuildModelTask', 'sfDoctrineCleanModelFilesTask', 'sfDoctrineDeleteModelFilesTask' tasks.
- Very simple syntax: DoctrineTableGetter::getInstance()->getUserTable() is equivalent to Doctrine::getTable('User') but
the former one informs IDE that it returns a UserTable instance, which makes it possible to have code completion.
- Works with all major IDE's like, Eclipse PDT, Zend Studio, Netbeans PHP IDE etc.
Developers
License
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
THE SOFTWARE.
Releases for sf 1.4
| Version |
License |
API |
Released |
|
1.1.0stable
|
MIT license |
1.0.0stable
|
01/01/2011 |
|
1.0.5stable
|
MIT license |
1.0.0stable
|
01/01/2011 |
|
1.0.0stable
|
MIT license |
1.0.0stable
|
01/01/2011 |
Releases for sf 1.3
| Version |
License |
API |
Released |
|
1.1.0stable
|
MIT license |
1.0.0stable
|
01/01/2011 |
|
1.0.5stable
|
MIT license |
1.0.0stable
|
01/01/2011 |
|
1.0.0stable
|
MIT license |
1.0.0stable
|
01/01/2011 |
Releases for sf 1.2
| Version |
License |
API |
Released |
|
1.1.0stable
|
MIT license |
1.0.0stable
|
01/01/2011 |
|
1.0.5stable
|
MIT license |
1.0.0stable
|
01/01/2011 |
Changelog for release 1.0.5 - 01/01/2011
Other releases
Release 1.2.0 - 03/01/2011
- Plugin compatibility Issues fixed.
Release 1.1.0 - 01/01/2011
- Some cosmetics and make up.
- Clarity and more compatibility.
Release 1.0.5 - 01/01/2011
Release 1.0.0 - 01/01/2011
sfDoctrineTableGetterPlugin
The 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.
Installation
Usage Info
- Install the plugin, clear the cache
- Run one of the doctrine build tasks (build or build-model)
To get User table use following:
DoctrineTableGetter::getInstance()->getUserTable();
which is equivalent to this native doctrine call:
Doctrine::getTable('User');
Bounded Tasks
Plugin regenerates it's auto-generated getter class after execution of
following tasks:
- build
- build-model
- clean
- clean-model-files
- delete-model-files
How to contribute.
If you want to contribute to this plugin, you can contact me with my listed
email address, I'll review your contribution and try to plan in upcoming
versions.