Leveraging the Doctrine Data Provider
Our UserDataProvider is now responsible for loading the collection of users. But
we lost pagination and filtering because the normal data provider from Doctrine
usually handles that!
Let's actually find that class. I'll ...
Installing Doctrine
... talk to the
database? The answer is... no! Because... it doesn't have to!
Why? Enter Doctrine: the most powerful library in the PHP world for working
with databases. And Symfony and Doctrine work great together: they're ...
Databases and Doctrine
... run
raw SQL queries, that's great! When we create services in Episode 3, you'll
learn some life-saving strategies to organize something like this.
But most people that use Symfony use a third-party library called Doctrine ...
Doctrine en dehors des sentiers battus Romaric Drigon
... L'ORM Doctrine offre beaucoup plus de flexibilité qu'il n'y paraît. Dans cette présentation, nous allons nous intéresser à son fonctionnement interne et à ses fonctionnalités moins connues, pour découvrir comment mieux ...
Doctrine en dehors des sentiers battus Romaric Drigon
... L'ORM Doctrine offre beaucoup plus de flexibilité qu'il n'y paraît. Dans cette présentation, nous allons nous intéresser à son fonctionnement interne et à ses fonctionnalités moins connues, pour découvrir comment mieux ...
Doctrine DQL
Hey there friends! And thanks for joining me for to a tutorial that's all about the
nerdery around running queries in Doctrine. It sounds simple... and it is for a while.
But then you start adding joins, grouping ...
ManyToOne Doctrine Relationships
ManyToOne Doctrine Relationships¶
Right now, if I creat an Event, there’s no database link back to my user.
We don’t know which user created each Event.
To fix this, we need to create a OneToMany relationship from ...
Installing Doctrine
Well hey friends! And bienvenidos to our tutorial about learning Spanish! What?
That's next week? Doctrine?
Ah: welcome to our tutorial all about making Symfony talk to a database... in
English.
We learned a ton in the ...
Simple Doctrine Data Fixtures
... database. We created some
data fixtures, in a sense, via this new action. But Doctrine has a system
specifically designed for this.
Search for "doctrinefixturesbundle" to find its GitHub repository. And you can
actually read ...
The Patterns Behind Doctrine
... denis.brumann [at] sensiolabs.de and also on twitter and
GitHub with my initial and last name.
And before I start I want to make clear that everything I will talk about is
about Doctrine 2 not Doctrine 3. It's not out yet ...
Doctrine Extensions Sluggable and Timestampable
Doctrine Extensions: Sluggable and Timestampable¶
I want to show you a little bit of Doctrine magic by using an open source
library called DoctrineExtensions. The first bit of magic we’ll add is
a slug to Event. Not ...
Doctrine Extensions Timestampable
... and cleverly set it by
hand in the constructor. But what about $updatedAt? Doctrine does have an awesome
event system, and we could hook into that to run code on "update" that sets that
property. But there's a library ...
Doctrine postLoad Listener
... property in
our entity but not persist it to Doctrine. Call it $isMvp and let's add
some documentation that can be used by the API docs:
Returns true if this user is an MVP
Next, down at the bottom, go to "Code ...
Sluggable Doctrine Extensions
... for entities, including one called Sluggable. And
actually, the bundle is just a tiny layer around another library called
doctrine extensions.
This is where the majority of the documentation lives. Anyways, let's get the ...
Doctrine
... simple
solution to that. Just copy the full Entity annotation, say use, paste that and
then delete the last part and instead stay as ORM;:
That's the standard use statement that you see at the top of all Doctrine ...
Doctrine Transaction Validation Middleware
... this middleware,
it will wrap your handler inside a Doctrine transaction. If the handler throws
an exception, it will rollback the transaction. And if no exception is thrown,
it will commit it. This means that your handler ...
|
// ... lines 1 - 31
|
|
abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, MultiGetCache |
|
{ |
|
// ... lines 34 - 276
|
|
} |
See Code Block in Script
|
// ... lines 1 - 2
|
|
namespace AppBundle\Doctrine; |
|
|
|
use Doctrine\ORM\Mapping\ClassMetadata; |
|
use Doctrine\ORM\Query\Filter\SQLFilter; |
|
|
|
class DiscontinuedFilter extends SQLFilter |
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) |
|
{ |
|
|
|
} |
|
} |
See Code Block in Script
2724
Doctrine
Filter Results