[symfony-users] Re: Doctrine: execute vs fetchArray

2009-11-27 Thread Michael Boyd
The source of fetchArray() is:

public function fetchArray($params = array())
{
return $this->execute($params, Doctrine_Core::HYDRATE_ARRAY);
}

So they are exactly the same :)

On Nov 27, 8:34 pm, Adrien Mogenet  wrote:
> Hi all,
>
> I'm a Propel user, but I'm switching to Doctrine...
>
> I don't know if I should use execute() or fetchArray() to retrieve my
> data.
>
> execute() : I get an array of Object, and I like dealing with
> Objects !
>
> fetchArray() : I read that it's better (less memory consuming ?) but I
> don't really enjoy managing arrays (and arrays of arrays when I get
> relationship). Moreover, when they're given to my view, it's
> considered as sfOutputEscaperArrayDecorator so I have to perform -
>
> >getRawValue().
>
> Is it really awful to call "execute()" method in Doctrine ?
>
> --
> Adrien

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: how to give a parameter to a form ?

2009-04-11 Thread Michael Boyd

To add a parameter, in your action code:
$form = new WhateverForm($object, array('param' => 'value'));

In your form:
$this->getOption('param');

On Apr 11, 2:24 pm, dziobacz  wrote:
> I action.class.php I have:
> $this->form = new Change_dataForm("Michael");
>
> And in Form:
> private $something;
>
>   public function __construct($name)
>   {
>     $something = $name;
>   }
>
> But I have an error:
> Fatal error: Call to a member function getDefaults() on a non-object
>
> WHY ??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Multiple routing files

2009-03-26 Thread Michael Boyd

I've been trying to split my routes into several files (lots of
routes) but don't think this can be done? Is there a way to do this
similar to schemas, e.g. every /config file ending in "schema.yml" is
parsed as a schema. But only routes.yml is parsed for routing, and not
"more.routes.yml".

Any ideas?

Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Command line "propel-build-schema --xml" deleted schema.yml - can I get the .yml back?

2008-12-31 Thread Michael Boyd

Hi,

I had a pretty big schema I've used throughout a project, and always
used schema.yml to control it. I used "propel-build-schema --xml" on
the command line just to see the XML generated and it deleted the .yml
file without asking. I'm pretty pissed about this now.

I know I can use "propel-build-schema" (without "--xml") to generate a
new one, but that is verbose and ugly and I liked the one I had.

It was being developed on localhost and not yet on subversion.

Any ideas? :(

Thanks a TON if you can help.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---