public function getId($resource) { $closure = $this->identityClosure; $identity = $closure($resource); return $identity; }