php - Common lib on symfony2 -


before using symfony2, used have common lib lot of simple useful functions (for instance, function takes "azè_rtï" in argument , returns "aze-rti").

so, well, created bundle: commonlibsbundle.

but.. have 1 or 2 php files. not make sense me use controller / view / model in kind of situation. should do? may erase folders in new bundle (controller, dependencyinjection, resources, tests... + commonlibsbundle.php) , put lib.php in it?

many thanks, bliss

unless need tap symfony framework - configuration or define services, doesn't need bundle - it's library. give reasonable namespace, , call required other component or library.

even if wanted add symfony-specific services call, there said still have external simple library - usable anywhere, wrapped thin bundle add symfony-specific (or laravel, or zf, or whatever) services , configuration required.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -