If you only need the model, you don't need symfony - propel can be used w/o the framework (it is a standalone project). See http://propel.phpdb.org/trac/
On Sun, Jul 5, 2009 at 01:02, Dennis Jacobfeuerborn<[email protected]> wrote: > > Hi, > I'm writing an application requires different frontends for different > use-cases but most of them deal with the same models. How would I > write a batch script that uses the symfony model classes to manipulate > the model? > > I tried a file with: > > require_once(dirname(__FILE__).'/../config/ > ProjectConfiguration.class.php'); > $configuration = ProjectConfiguration::getApplicationConfiguration > ('frontend', 'prod', false); > sfContext::createInstance($configuration)->dispatch(); > echo "hello\n"; > > The problem is that this script not only outputs "hello" but also the > complete login page of the frontend html application. What I basically > want to accomplish is to output only the name of a user in the > database with the following code: > > $c = new Criteria(); > $c->add(UserPeer::USERNAME, 'testuser'); > $user = UserPeer::doSelectOne($c); > echo $user->getUsername(); > > In other words I want to be able to manipulate the model but don't > really need all the routing, templating and MVC stuff. > > Regards, > Dennis > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
