[symfony-users] Accesing config values

2008-04-07 Thread Reynier Perez Mira

Hi every:
I need to paginate some values from a query. This is not a problem because I 
can use sfPropelPager class. For that I do this at first:

public function executeListar()
{
  $this->pag = new sfPropelPager('Nombre_Clase', cantidad_por_pagina);
}

Now I want to create some global var and access to they using sfConfig class. 
I've been reading the Definitive Guide to Symfony specifically the epigraph 
"Accessing the Configuration from Code"
and there the authors said that I can use the file app.yml. They explain also 
that this file is inside myproject/apps/myapps/config/app.yml[1] but I think 
that I can copy that file to /mymodule/config and use this also. Well before 
trying with "mymodules" folder I work with the default file [1]. Then I do this:

dev:
CantidadCategorias: 2

In my actions.class.php I wrote this:

public function executeListar()
{
  $this->pag = new sfPropelPager('Nombre_Clase', 
sfConfig::get('app_CantidadCategorias', 5));
}

When I call the URL: http://localhost/backend_dev.php/geslicsoft/Listar this 
should list the result two by two but it doesn't list as I expect. The table 
inside the DB has 5 or more records.

¿What I'm doing wrong?
Cheers and thanks in advance
Ing. Reynier Pérez Mira
Grupo Soporte al Desarrollo - Dirección Técnica IP 

 

__ Information from ESET NOD32 Antivirus, version of virus signature 
database 3008 (20080408) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Doctrine vs. Symfony 1.1 ? (was: Doctrine Admin Generator)

2008-04-07 Thread Jonathan Wage
Doctrine won't be eligible to be supported like Propel is until Doctrine
stabilizes. It is still in what some would consider the Beta/RC state.
Hopefully the bugs slow down soon :)

- Jon

On Sun, Apr 6, 2008 at 8:40 AM, Christian Hammers <[EMAIL PROTECTED]> wrote:

>
> Hello Ian
>
> On 2008-03-24 Ian P. Christian wrote:
> ...
> > Up until recently I've been maintaining sfDP1.1 to keep it working with
> > sf1.1.  However... we've stopped using doctrine internally, so I've
> > stopped maintaining it.
>
> What does this mean for the upcoming 1.1 release? I thought that
> Doctrine+PDO should replace Propel+Creole or at least be equally
> supported.
>
> bye,
>
> -christian-
>
> >
>


-- 
Jonathan Wage
http://www.jwage.com
http://www.centresource.com

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Call to undefined method sfWebResponse::setParameter.

2008-04-07 Thread Marijn

On Apr 7, 4:26 pm, Fabien POTENCIER <[EMAIL PROTECTED]
project.com> wrote:
> Marijn wrote:
> > Hi everybody,
>
> > I just started using symfony a month ago so I figured I better move to
> > 1.1 now, I really don't feel like learning about stuff that will be
> > deprecated in a month or two ;-)
>
> > I had a simple filter that would place all my JavaScripts to the
> > bottom of the page that would set the parameterholder
> > 'javascripts_included' on the response object. But if I run that
> > filter now it says that the method setParameter is undefined. I figure
> > that would be because the response object isn't built yet..?
>
> Instead of using
>
>    $response->getParameter('javascripts_included', true,
> 'symfony/view/asset')
>
> you can now use
>
>    sfConfig::set('symfony.asset.javascripts_included', true)
>

Thanks for your quick reply Fabien :-)

May I conclude that:

 - all the symfony parameters are moved to sfConfig..?
 - sfConfig::get('symfony.asset.javascripts_included') is the
getParameter counterpart..?

In respect to beauty in code, I think this would be a nice example ;-)

Thanks,

Marijn

> Fabien
>
>
>
> > Are there changes in 1.1. regarding this which I am unaware of..?
>
> > Thanks,
>
> > Marijn
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfLucene - how to non re-index propel object temporally?

2008-04-07 Thread gestadieu

good news, thanks!
so far I created a peer method using a doUpdate to avoid to trigger
sflucene but I will look at your solution in the new solution. I did
not see any documentation yet about this but I will look at your
code.

On Apr 6, 4:18 am, Carl Vondrick <[EMAIL PROTECTED]> wrote:
> On Wednesday, April 02, 2008, Nicolas Perriault wrote:
> > Yes, as of r7866, you can use sfLucenePropelBehavior::setLock(true) to
> > disable the behavior, and sfLucenePropelBehavior::setLock(false) to
> > enable it again when you're done.
>
> FYI, this feature is now included in version 0.1.6 (pushed today).
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfLucene - how to non re-index propel object temporally?

2008-04-07 Thread gestadieu

good news, thanks!
so far I created a peer method using a doUpdate to avoid to trigger
sflucene but I will look at your solution in the new solution. I did
not see any documentation yet about this but I will look at your
code.

On Apr 6, 4:18 am, Carl Vondrick <[EMAIL PROTECTED]> wrote:
> On Wednesday, April 02, 2008, Nicolas Perriault wrote:
> > Yes, as of r7866, you can use sfLucenePropelBehavior::setLock(true) to
> > disable the behavior, and sfLucenePropelBehavior::setLock(false) to
> > enable it again when you're done.
>
> FYI, this feature is now included in version 0.1.6 (pushed today).
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Call to undefined method sfWebResponse::setParameter.

2008-04-07 Thread Fabien POTENCIER


Marijn wrote:
> Hi everybody,
> 
> I just started using symfony a month ago so I figured I better move to
> 1.1 now, I really don't feel like learning about stuff that will be
> deprecated in a month or two ;-)
> 
> I had a simple filter that would place all my JavaScripts to the
> bottom of the page that would set the parameterholder
> 'javascripts_included' on the response object. But if I run that
> filter now it says that the method setParameter is undefined. I figure
> that would be because the response object isn't built yet..?

Instead of using

   $response->getParameter('javascripts_included', true, 
'symfony/view/asset')

you can now use

   sfConfig::set('symfony.asset.javascripts_included', true)

Fabien

> 
> Are there changes in 1.1. regarding this which I am unaware of..?
> 
> Thanks,
> 
> Marijn
> > 
> 
> 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Call to undefined method sfWebResponse::setParameter.

2008-04-07 Thread Marijn

Hi everybody,

I just started using symfony a month ago so I figured I better move to
1.1 now, I really don't feel like learning about stuff that will be
deprecated in a month or two ;-)

I had a simple filter that would place all my JavaScripts to the
bottom of the page that would set the parameterholder
'javascripts_included' on the response object. But if I run that
filter now it says that the method setParameter is undefined. I figure
that would be because the response object isn't built yet..?

Are there changes in 1.1. regarding this which I am unaware of..?

Thanks,

Marijn
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Mysterious URL concatenation behavior

2008-04-07 Thread Eno

On Sun, 6 Apr 2008, Jill Elaine wrote:

> On Apr 6, 2:19 am, "Thomas Rabaix" <[EMAIL PROTECTED]> wrote:
> > Does the getFilepath return a string value, or just echo the value ...
> > that will explain why the filepath is displayed at first
> 
> I am not sure I understand the difference?

Simply put, you can only chain function calls like that if your functions 
return objects.

$this->function() means call the function() method of the current 
object...



-- 



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Mysterious URL concatenation behavior

2008-04-07 Thread Jill Elaine

On Apr 6, 2:15 pm, "Thomas Rabaix" <[EMAIL PROTECTED]> wrote:
> Don't use RAW SQL with mysql_* function. It is not the aims of this framework.

You are absolutely right, Thomas. I am struggling with Propel right
now. Thanks to your link, I found quite a bit of documentation on
propel and will print it. It is like learning a foreign language to
me, and so, I still have to translate from first language, SQL, to
propel. It will be some time before I can think in propel!

Because my time frame is tight, I have given up on propel in a few
places until I become more proficient. I have lots of other code that
will need to be refactored, so I've made notes on where the 'uglies'
are hiding and will come back to change to propel. I am a believer in
database abstraction layer!

I have learned much from this thread! Thank you.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---