Newscoop\Service\Implementation\AEntityBaseServiceDoctrine::__construct PHP Метод

__construct() публичный Метод

Construct the service base d on the provided resource id.
public __construct ( ResourceId $id )
$id Newscoop\Service\Resource\ResourceId The resource id, not null not empty
    function __construct(ResourceId $id)
    {
        Validation::notEmpty($id, 'id');
        $this->id = $id;
        $this->_init_();
        if (is_null($this->entityClassName)) {
            throw new \Exception("Please provide a entitity class name to be used");
        }
    }

Usage Example

Пример #1
0
 /**
  * Construct the service base d on the provided resource id.
  * @param ResourceId $id
  * 		The resource id, not null not empty
  */
 function __construct(ResourceId $id)
 {
     parent::__construct($id);
     if (is_null($this->searchClassName)) {
         throw \Exception("Please provide a search class name to be used.");
     }
 }