Last active
November 8, 2016 15:00
-
-
Save alcaeus/20e3a60507faa069521d505a49835db3 to your computer and use it in GitHub Desktop.
Builder interfaces for MongoDB query builders in a backwards compatible way
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Doctrine\MongoDB\Builders\Query; | |
class Builder implements BuilderInterface, MongoDB32BuilderInterface { | |
// ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Doctrine\MongoDB\Builders\Query; | |
interface BuilderInterface { | |
public function getQuery(): Query; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Doctrine\ODM\MongoDB; | |
use Doctrine\MongoDB\Builders\Query\BuilderInterface; | |
class DocumentRepository | |
{ | |
public function createQueryBuilder(): BuilderInterface; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Doctrine\MongoDB\Builders\Query; | |
/** | |
* Declares query operators added in MongoDB 3.2 | |
*/ | |
interface MongoDB32BuilderInterface { | |
public function bitsAllClear($value): self; | |
public function bitsAllSet($value): self; | |
public function bitsAnyClear($value): self; | |
public function bitsAnySet($value): self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment