0

I wantend to create a complex grouping using doctrine query and I used Snippets:

Snippet Doctrine custom grouping

$q = myDQ::create()
  ->from('Some s');

It gives me a mistake:

Strict Standards: Declaration of MyDq::create() shuld be compatible with that of Doctrine_Query::create() in URL-ROOT/lib/MyDq.class.php

j0k
  • 22,600
  • 28
  • 79
  • 90
  • Could you show us the whole query you want to create ? Not only the create & from ? – j0k Jun 06 '12 at 14:14

1 Answers1

1

Doctrine_Query:create is declared this way:

public static function create($conn = null, $class = null)

you did:

public static function create($conn = null)

which doesn't work because of the different arguments.

For information on overriding static methods you may also find this page interesting: php.net/manual/language.oop5.static.php

Del Pedro
  • 1,216
  • 12
  • 32