stefan Posted March 27, 2013 Share Posted March 27, 2013 (edited) Hello Guys there is another app (foolish xtmshop) with smarty engine and i include pw inside some smarty functions example <?php require_once '_w/index.php'; function smarty_function_getWireProduct($params, &$smarty) { if( $oProduct = wire('pages')->get('/produkte/' . $smarty->_tpl_vars['PRODUCTS_MODEL'] . '/') ) { $smarty->assign('wireProduct', $oProduct); } return null; } few minutes ago i installed the Language Support (german Language pack) and all works fine. But the app also use a class "language" so this run into the "cannot redeclare class language" error. Any ideas how to prevent this? Thanks in advance adios, Stefan Edit: Ok. i see... there are a lot of related topics around. But not a quick solution, right? Waiting for namespaces... Edited March 27, 2013 by stefan Link to comment Share on other sites More sharing options...
ryan Posted March 27, 2013 Share Posted March 27, 2013 Ok. i see... there are a lot of related topics around. But not a quick solution, right? Waiting for namespaces... Just to follow up, you are right that namespaces will solve this. And they are coming in 2.4. Otherwise, the only options are to rename one of the classes (and anything referencing that name), or let your applications talk to each other via some other route, like web services. Link to comment Share on other sites More sharing options...
stefan Posted March 27, 2013 Author Share Posted March 27, 2013 Hi Ryan Just to follow up i will, definitely. Who wants not follow the revelation of st. P.W. Cramer? Link to comment Share on other sites More sharing options...
MadeMyDay Posted March 28, 2013 Share Posted March 28, 2013 HA! All of them are joining the new hope Welcome Stefan (oldschool MODX hacker, we had a lot of ideas, among which got developed by him, most of them were dropped because of... well. The system.) Stefan, gimme a call (friday perhaps when all are eating their rabbits). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now