ikkez / f3-cortex

A multi-engine ORM / ODM for the PHP Fat-Free Framework
GNU General Public License v3.0
118 stars 22 forks source link

Use Cortex in another framework / standalone ? #55

Open wargx opened 7 years ago

wargx commented 7 years ago

Hi Christian,

Is there a possibility to use cortex in other frameworks like zend ?

It is really awesome module! thanks for your work.

ikkez commented 7 years ago

thanks for asking, well Cortex was build on top of the standard mappers provided by F3 itself.. so it cannot run on its own at the moment. However, you could include all the required F3 modules along with Cortex to another framework and use it as a standalone mapper. You need the base.php, and those plugins: UTF, Magic, DB\Cursor, DB\SQL, DB\SQL\Mapper, and you probably need to manually adjust the Base->contruct method, because it does some global changes to the PHP globals and settings and could potentially interfere with another framework. But I guess it would work in the end ;)