Added method \ncc\Objects > HttpRequest > requestHash()

This commit is contained in:
Netkas 2022-12-15 17:48:20 -05:00
parent 6d35e42106
commit fa8301710f

View file

@ -77,6 +77,17 @@
]; ];
} }
/**
* Returns the hash of the object.
* (This is used for caching)
*
* @return string
*/
public function requestHash(): string
{
return hash('sha1', json_encode($this->toArray()));
}
/** /**
* Constructs a new HttpRequest object from an array representation. * Constructs a new HttpRequest object from an array representation.
* *