[symfony-users] Re: symfony cache doubt

2011-01-24 Thread Richtermeister
Hey Shihab, what I did is create a class that extends sfViewCacheManager, and override the generateCacheKey() method like so: public function generateCacheKey($internalUri, $hostName = '', $vary = '', $contextualPrefix = '') { $key = parent::generateCacheKey($internalUri, $hostName, $vary, $c

Re: [symfony-users] Re: Symfony2 Twig Helpers and _view variable

2011-01-24 Thread Fabien Potencier
On 1/24/11 5:02 PM, Jérôme TEXIER wrote: Hi Fabien, My question is just what is the best way to use some user-defined helper functions (for instance a bread crumb function) on Twig. Before PR5, I was injecting helper class (Templating\Helper \FooHelper.php) on the view and had access to those fu

Re: [symfony-users] [sf2] Symfony2 generic routes - automaticaly resolved controller

2011-01-24 Thread hidenorigoto
Hi, I've just updated the DefaultRouteBundle to follow the newest Symfony2 rules. https://github.com/hidenorigoto/DefaultRouteBundle But the conventions of the bundle namespaces are being changed. so for the newest rules, please refer to the DEV ML. I think these new conventions will not be ap

Re: [symfony-users] [symfony2] User authentication and session persistence problem

2011-01-24 Thread taidehuone
I have now completely resolved this issue. Your user entity - the one that implements either AccountInterface or AdvancedAccountInterface - must have a __toString() method which returns the login identifier and absolutely nothing else. This is not obvious behavior in my opinion. -- If you want t

[symfony-users] Re: Symfony2 Twig Helpers and _view variable

2011-01-24 Thread Jérôme TEXIER
Hi Fabien, My question is just what is the best way to use some user-defined helper functions (for instance a bread crumb function) on Twig. Before PR5, I was injecting helper class (Templating\Helper \FooHelper.php) on the view and had access to those functions via the former _view variable. I w

Re: [symfony-users] Re: lib/model/doctrine/subfolder

2011-01-24 Thread Cornelius Parkin
Hi Gareth Thanks a lot for your help thus far... I have tried implementing your solution, but can not seem to succeed. I am using doctrine and have been looking at Doctrine packages. When implementing it as they say on http://www.doctrine-project.org/projects/orm/1.2/docs/manual/yaml-schema-files

[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-24 Thread Venzon
Thank you for all your replies My current multiple entity manager config looks like this atm: entity_managers: default: connection: conn1 db1: connection: conn1 mappings: HelloBundle: type: annotation

Re: [symfony-users] Re: lib/model/doctrine/subfolder

2011-01-24 Thread Gareth McCumskey
There is a symfony command to do exactly that: symfony doctrine:build-schema 1. Make a back up copy of your existing schema.yml (make it schema.yml.bak or something) 2. Change databases.yml to point to your other database. 3. Run symfony doctrine:build-schema 4. Rename your new schema.yml to be da

Re: [symfony-users] Re: symfony cache doubt

2011-01-24 Thread Gareth McCumskey
You could also look at using a memory cache like APC. I wrote a blog post about this that has some details: http://garethmccumskey.blogspot.com/2009/04/memory-caching-can-be-saviour.html On Mon, Jan 24, 2011 at 2:06 PM, Shihab KB wrote: > Hi, > > Thanks for your answer. > > Can you tell me how

Re: [symfony-users] Re: lib/model/doctrine/subfolder

2011-01-24 Thread Cornelius Parkin
Hi, thanks a lot Gareth Do you know of a way to build the schema file i.e. database.schema.yml from an existing database? I have a secondary database called accessdb and want to run doctrine:build-schema that will populate the accessdb.schema.yml file with the database structure. Regards CAP On

[symfony-users] Re: symfony cache doubt

2011-01-24 Thread Shihab KB
Hi, Thanks for your answer. Can you tell me how can I do that? Do u have any reference links? I am not much familiar. Can you tell me with one example. I am really thankful to you. regards Shihab On Jan 23, 12:01 am, Richtermeister wrote: > I believe you can make the cache key whatever you wa

Re: [symfony-users] Re: lib/model/doctrine/subfolder

2011-01-24 Thread Gareth McCumskey
A link I found with a little more detail: http://itscommonsensestupid.blogspot.com/2009/04/how-to-configure-multiple-databases-for.html On Mon, Jan 24, 2011 at 12:48 PM, Cornelius Parkin < cornelius.par...@gmail.com> wrote: > Hi Gareth, thanks so much... I am going to try it and let you know the

Re: [symfony-users] Re: lib/model/doctrine/subfolder

2011-01-24 Thread Cornelius Parkin
Hi Gareth, thanks so much... I am going to try it and let you know the outcome :-) Regards CAP On Mon, Jan 24, 2011 at 12:45 PM, Gareth McCumskey wrote: > Yes you can. > > Create a second schema file and call it newschemname.schema.yml , changing > newschemname to whatever you want. Inside this

Re: [symfony-users] Re: lib/model/doctrine/subfolder

2011-01-24 Thread Gareth McCumskey
Yes you can. Create a second schema file and call it newschemname.schema.yml , changing newschemname to whatever you want. Inside this new schema file add the following the top: new_database_name: _attributes: package: lib.model.subdirectory This will store the model files for this schema

Re: [symfony-users] Re: lib/model/doctrine/subfolder

2011-01-24 Thread Cornelius Parkin
Hi, thanks, I will look into that, not sure if it will allow a subfolder under lib/model/doctrine though? Can schema.yml e overridden in an application? Regards CAP On Mon, Jan 24, 2011 at 11:20 AM, Justen Doherty wrote: > you could try creating a new application and tweak the schema.yml in you

Re: [symfony-users] Re: lib/model/doctrine/subfolder

2011-01-24 Thread Justen Doherty
you could try creating a new application and tweak the schema.yml in your new app.. On Mon, Jan 24, 2011 at 9:12 AM, Cornelius Parkin < cornelius.par...@gmail.com> wrote: > Hi > > Anyone have any possible solutions regarding this? Have not had a response > yet. Is it also possible to build a sepe

[symfony-users] Re: lib/model/doctrine/subfolder

2011-01-24 Thread Cornelius Parkin
Hi Anyone have any possible solutions regarding this? Have not had a response yet. Is it also possible to build a seperate shema file from the default schema.yml for the separate database and then build the models in a different directory from that schema file? Thanks in advance... Regards CAP