Just remember one thing. Don't do your benchmarks using the dev front
controller. The dev controller has no caching, loads additional global
variables to keep track of request/response info and other debug
information. The best test is to benchmark on the production front
controller as this is wher
Thanks a lot, I was sooo into doctrine that I forgot that php can
issue warnings as well ;)
Again thanks
On Oct 27, 7:06 am, Alexandre SALOME
wrote:
> Yes,
>
> A strict PHP object standard is "when you overload a method, you must set
> the same "signature" :
>
> - same method name
> - same
i tried searching but unfortunately there's too little documentation
for symfony at the moment.
On Oct 26, 7:14 pm, Alexandre SALOME
wrote:
> You can have a look at upload plugins in the plugins repository on website.
>
> Maybe you fill find a plugin that fill your needs.
>
> Otherwise, sourceco
It means the "signature" of your save method is different. Make sure
you take the same parameters as the parent function.
Daniel
On Oct 26, 6:19 am, mbernasocchi wrote:
> thanks, it works as expected, I just had to add
> return parent::save($conn); instead of only parent::save($conn); to be
>
ok, sure...
so i guess that all the signin code should be here, in myUser class,
and not in the signin module...
anyway, i'll have a deep look at the sfGuardSecurityUser.class.php
code.
thanks very much for your time!
On Oct 27, 12:35 am, Frank Stelzer wrote:
> look in the signin method, this
look in the signin method, this attribute is saved there:
" $this->setAttribute('user_id', $user->getId(),
'sfGuardSecurityUser');"
Ok i think the rest is really search and find stuff and should not be
discussed on this public list furthermore.
Am 27.10.2009 um 00:28 schrieb lorenx:
>
> d
don't you think you've finished with me! :P
$id = $this->getAttribute('id', null, 'MyCustomUser')
does not return any id... :(
i've even tried:
$this->getAttribute('id', null, 'sfGuardSecurityUser')
and
$this->getAttribute('user_id', null, 'sfGuardSecurityUser')
On Oct 27, 12:11 am, Frank Ste
This is handy snippet that allows module based css to be included - a
handy way to reuse style & (when extended) js.
http://snippets.symfony-project.org/snippet/306
On Tue, 27 Oct 2009 00:00:23 +0100, Sid Ferreira wrote:
> Alexandru, see, I'm not disappointed, but excited. I've just found wa
eureka! :)
Am 27.10.2009 um 00:06 schrieb lorenx:
>
> do you mean somethig like this?
>
> class myUser extends sfBasicSecurityUser
> {
>protected $user = null;
>
>public function getCustomUser() {
>if (!$this->user && $id = $this->getAttribute('id', null,
> 'MyCustomUser')) {
>
Yes,
A strict PHP object standard is "when you overload a method, you must set
the same "signature" :
- same method name
- same arguments
- same types
To make simple, you must copy/paste the function declaration line of
sfDoctrineForm.class.php :
public function save(...)
to yourForm
do you mean somethig like this?
class myUser extends sfBasicSecurityUser
{
protected $user = null;
public function getCustomUser() {
if (!$this->user && $id = $this->getAttribute('id', null,
'MyCustomUser')) {
$this->user = MyCustomUserPeer::retrieveByPk($id);
Alexandru, see, I'm not disappointed, but excited. I've just found ways to
improve my work!
I have too few time to research, so, anything like this is like gold :D
On Mon, Oct 26, 2009 at 20:51, Eno wrote:
>
> On Mon, 26 Oct 2009, Sid Ferreira wrote:
>
> > David: Could you share with me how you
Yes
"Add a method in your myUser class for retrieving an according and
valid instance of your guard user entry and thats it (see
getGuardUser)."
...
guard user is your custom user.
Am 26.10.2009 um 23:55 schrieb lorenx:
>
> mmm,
> but i don't have any getCustomUser() method;
> it seems
mmm,
but i don't have any getCustomUser() method;
it seems that it should return a MyCustomUser instance...
On Oct 26, 11:45 pm, Frank Stelzer wrote:
> You do not have to re-implement those methods, as your model class has
> it already done.
>
> You cann access them via:
>
> $this->getUser()-
On Mon, 26 Oct 2009, Sid Ferreira wrote:
> David: Could you share with me how you use it? Single domain, one app for
> each domain/subdomain... I wanna find out where I may be doing something
> wrong :D
There is no "wrong" or "right" way it depends on how you want to organize
code. Maybe differ
You do not have to re-implement those methods, as your model class has
it already done.
You cann access them via:
$this->getUser()->getCustomUser()->getEmail();
or add wrapper methods in your myUser class:
myUser:
---
public function getEmail()
{
return $this->getCustomUser()->getEmail()
> 3. Add a "getCustomUser" method to your myUser class and generate the
> mentioned link in this way.
sorry but...
if i need a (custom) getUsername() or a getEmail() method, do i need
to re-implement these methods from scratch in myUser class although i
already have them in MyCustomUser class?
> here my problem is that it does not seem possible to extend "my custom
> user class" to sfBasicSecurityUser cause it already extends its base
> class!
> i'm stuck here...
1. Take the myUser class and extend it from sfBasicSecurityUser as it
is by default.
2. Leave your MyCustomUser model clas
> The "myUser" class handles all security and session related stuff. It
> does not know any model specific details, as there might be something
> like a username field or an email field in some database table.
ok.
> The "guard" user (the one you already have implemented) is the one,
> whic
Now, that's a nice trick!!!
On Mon, Oct 26, 2009 at 19:45, Greg Maruszeczka wrote:
> On Mon, 26 Oct 2009 19:26:55 -0200
> Sid Ferreira wrote:
>
> > Hi everyone! Well, there's a while that I always use only one app.
> > Even in the admin I use routes instead of another app.
> >
> > The reason to
Thanks guys!, both solutions look good, going to use first 'CUSTOM' option
to cut down on expensive LIKE queries.
On Mon, Oct 26, 2009 at 5:16 PM, Alexandru-Emil Lupu
wrote:
> http://forum.symfony-project.org/index.php/m/23667/
>
>
--~--~-~--~~~---~--~~
You rece
Sid, i don't wanna disapoint you, but i guess you're the only one.
For the "js", css, uplads and so on, there is a directive called "alias" in
apache
example:
Alias /sf /srv/symfony/1.2/data/web/sf
AllowOverride All
Allow from All
alternatively you can do 2-3 things l
Hi,
You have to understand the purposes of the two different user classes:
The "myUser" class handles all security and session related stuff. It
does not know any model specific details, as there might be something
like a username field or an email field in some database table.
The "guard"
Usually a simple approach. Once frontend app per logical domain
(subdomain & business domain are usually the same for apps we develop), a
single back-end application for admins.
You don't often need full CRUD in every sf application - and keeping
things separate helps reduce risk.
Extensiv
Hmm, I don't think you understand me. Or I just don't get it yet :)
Two users: one from France (language FR), one from Holland (language
NL)
The website supports three languages: EN, FR and NL
FR guy submits his advertisement in EN and FR
Now the NL guy wants to view this advert. Because his cul
On Mon, 26 Oct 2009 19:26:55 -0200
Sid Ferreira wrote:
> Hi everyone! Well, there's a while that I always use only one app.
> Even in the admin I use routes instead of another app.
>
> The reason to that is that I don't want to duplicate files (CSS and
> JS), and so far didn't found a way to con
David: Could you share with me how you use it? Single domain, one app for
each domain/subdomain... I wanna find out where I may be doing something
wrong :D
On Mon, Oct 26, 2009 at 19:32, david wrote:
>
> Yes :P
>
> On Mon, 26 Oct 2009 22:26:55 +0100, Sid Ferreira
> wrote:
>
> > Hi everyone! Wel
thank you very much for your reply, but...
i already tried the sfGuardPlugin plugin and now i'd like to implement
my own user management.
how to bing my user class to the system one?
On Oct 26, 9:43 pm, Alexandru-Emil Lupu wrote:
> The ACL system is very simple ...
> You have 2 types of permis
Yes :P
On Mon, 26 Oct 2009 22:26:55 +0100, Sid Ferreira wrote:
> Hi everyone! Well, there's a while that I always use only one app.
> Even in the admin I use routes instead of another app.
>
> The reason to that is that I don't want to duplicate files (CSS and JS),
> and
> so far didn't found
Hi everyone! Well, there's a while that I always use only one app.
Even in the admin I use routes instead of another app.
The reason to that is that I don't want to duplicate files (CSS and JS), and
so far didn't found a way to config the web/admin/index.php to use the css
inside the web/ folder.
http://forum.symfony-project.org/index.php/m/23667/
On Mon, Oct 26, 2009 at 7:15 PM, Ari Army wrote:
> Hey all,
> I was wondering if this can be done via Propel's Peer classes...
>
> WHERE
> NO1='302-3001'
> AND
> NO2=2892
> AND -- the PART below is where i stumble
> LOWER( SUBSTR(FIRSTNAME,1,1)
Which means that the list of preferred cultures comes from the advert -
rather than from the site
On Mon, 26 Oct 2009 21:12:56 +0100, HAUSa
wrote:
>
> That is not what I mean. When a user submits an advertisement, he/she
> must enter it in his own local language (for example FR) and fo
The ACL system is very simple ...
You have 2 types of permissions:
- user permissions and group permissions.
When the user logs in, the system automatically compiles the permissions and
stores on the session.
check here
http://trac.symfony-project.org/browser/plugins/sfGuardPlugin/branches/1.2/lib
hi all,
i know this is a dangerous way but... how to create and use my own
user class?
i read that i need to make MyCustomUser class extends sfUser (or
sfBasicSecurityUser?) but MyCustomUser class already extends
BaseMyCustomUser that, in turn, extends BaseObject.
i also read to change the user
That is not what I mean. When a user submits an advertisement, he/she
must enter it in his own local language (for example FR) and for EN.
When a dutch user (language NL) views the advertisement, there will
ofcourse be no NL i18n content be submitted. So then Symfony has to
display the EN info.
Bu
Hi Fabien !
On 21 oct, 03:05, Fabian Lange
wrote:
> Hi Roberto,
> I have a hard time understanding your numbers.
> You say you generate a benchmark file in the front controller which
> just writes how long the page took to load?
> Which unit is that time? Is it bad? Is there any change when invo
Hey all,
I was wondering if this can be done via Propel's Peer classes...
WHERE
NO1='302-3001'
AND
NO2=2892
AND -- the PART below is where i stumble
LOWER( SUBSTR(FIRSTNAME,1,1) )='b'
AND
LOWER( SUBSTR(LASTNAME,1,1) )='r'
tried something like this before realized even though $first_initial is
low
thanks, it works as expected, I just had to add
return parent::save($conn); instead of only parent::save($conn); to be
able to use the object in a template.
the only thing is that i stll get the same warning about the strict
standard:
Strict Standards: Declaration of OpenBubbleForm::save() should
The idea :
class PostForm
{
protected $author;
public function setAuthor($author)
{
$this->author = $author;
}
public function save(Doctrine_Connection $conn = null)
{
if ($this->author !== null)
{
$this->getObject()->setAuthor($this->author);
}
parent::save
Alexandre thx a lot :)
david also thx but I use Alexandre idea :)
On 26 Paź, 12:22, david wrote:
> If you add a foreign alias to your relation then it's even easier...
>
> > relations:
> > sfGuardUser:
> > class: sfGuardUser
> > local: user_id
> > foreign: id
> > t
thanks a lot,
I see how to handle it now, just putting the save method as you said
gives me the following warning:
Strict Standards: Declaration of OpenBubbleForm::save() should be
compatible with that of sfFormDoctrine::save() in /home/me/
nosoapnobubbles/trunk/lib/form/doctrine/OpenBubbletForm.c
The trick with cultures is knowing what happens when, the reasons why -
and understanding where your code fits into the cycle.
There's a negotiation that happens between the browser and the server -
where they quiz each other about what cultures the browser has been
configured with - and wh
I've just entered the migrations world.
Everything is clear to me ... the only thing I haven't realized yet is
how do I get the version for the database in my project ?
Regards
--
Simone
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
If you add a foreign alias to your relation then it's even easier...
> relations:
> sfGuardUser:
> class: sfGuardUser
> local: user_id
> foreign: id
> type: one
> onDelete: CASCADE
> onUpdate: CASCADE
foreignAlias: Profile
> sfGuardUser:
> d
You can have a look at upload plugins in the plugins repository on website.
Maybe you fill find a plugin that fill your needs.
Otherwise, sourcecode will help you to find an approach.
Alexandre
2009/10/26 mel_06 <06melc...@gmail.com>
>
> i'm just new to symfony, used to code igniter before.
>
1. You mustn't set "1" as user_id" but the alias "dziobacz".
2. You mustn't set id column
3. You must set different names for fixtures.
4. You must use relation names for fixtures
Well, let's rewrite :
sfGuardUser:
sgu_dziobacz:
username: dziobacz
password: haslo123
sfGuardU
I have got table sfGuardUser and sfGuardUserProfile. Table
sfGuardUserProfile in schema.yml:
sfGuardUserProfile:
columns:
id:
type: integer(4)
primary: true
autoincrement: true
user_id:
type: integer(4)
default: ''
notnull: true
unique: true
Is it possible to set multiple cultures for users? For example first
the culture FR, then the culture EN.
When a Propel object is not available in FR, it automatically takes
the EN value.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
FYI, in Doctrine, mysql "char" is obtained by :
type: string
fixed: true
Without "fixed: true", its just "varchar".
Il also could be important to specify string length like this :
type: string(10)
fixed: true
On Oct 25, 11:23 am, ColinFine wrote:
> The "symfony and Doctrine" book, in chapter
Components are designed to be a once off type of functionality where a
helper needs data generated in order to fully display. Its designed not to
worry about routing etc as a performance improvement over the regular
action->template system.
If you need a partial to submit data to a component rathe
i'm just new to symfony, used to code igniter before.
i'm doing a multiple upload but i'm really stuck on how i will do my
form for this.
i do hope for someone's help.
thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
The answser is just no. Component are not supposed to handle routing
logical.
Refactor your code
2009/10/26 HAUSa
>
> Is it possible to redirect from a component?
> Because the redirect() function doesn't work (Call to undefined method
> systemComponents::redirect)
> >
>
--
Alexandre Salomé
Is it possible to redirect from a component?
Because the redirect() function doesn't work (Call to undefined method
systemComponents::redirect)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To
i have reported to Netbeans bug tracker an enhancement so there is
a switch to choose ORM when generating new projects with symfony 1.3
or higher
On Oct 25, 3:46 pm, Maras wrote:
> Anyone knows how to create symfony project iwith ORM Propel. n
> Netbeans with ORM Propel. When I check command lis
You must set the user ID after saving.
A possible solution would be to pass a sfGuardUser on saving of form :
class PostForm
{
// ...
public function save($author, Doctrine_Connection $conn = null)
{
$this->setAuthor($author);
$this->save($conn);
}
}
Another way would be to add a
Hi, I've a Post model in my app, I need to set the author Id of the
post to the id of the logge user (as in any forum). I succeeded by
overwriting the save() method of the Post.class.php and making it like
this:
public function save(Doctrine_Connection $conn = null)
{
if ($this->isNew())
56 matches
Mail list logo