public function getProvider() { if (null === $this->provider) { $this->provider = $this->createProvider($this->getEntity()); } return $this->provider; }