public function __construct(Resource $resource, StringIdentifier $identifier) { $this->project = $resource->getProject(); $this->resource = $resource; $this->identifier = $identifier; $this->hash = new Hash($this->identifier); $this->phrases = new ArrayCollection(); }
public function __construct(Resource $resource) { $this->resource = $resource; $this->pathname = (string) $resource->getPathname(); }
public function __construct(ResourceModel $resource) { $this->id = $resource->getId(); $this->project = (string) $resource->getProject()->getSlug(); $this->pathname = (string) $resource->getPathname(); }