Added method \ncc\Objects > HttpRequest > requestHash()
This commit is contained in:
parent
6d35e42106
commit
fa8301710f
1 changed files with 11 additions and 0 deletions
|
@ -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.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue