WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface::getId PHP Method

getId() public method

The method returns the ID of the current resource which should be a UUID.
public getId ( mixed $domainObject ) : string
$domainObject mixed
return string
    public function getId($domainObject);

Usage Example

 /**
  * Returns the resource ID for the current domain object.
  *
  * It is a shortcut of calling the resource transformer's getId() method.
  *
  * @return string
  */
 public function getResourceId()
 {
     return $this->transformer->getId($this->domainObject);
 }