public function CslStyle::calculateHash in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x src/Entity/CslStyle.php \Drupal\bibcite\Entity\CslStyle::calculateHash()
Calculate hash from CSL text.
Return value
string Hash string calculated from CSL text.
Overrides CslStyleInterface::calculateHash
File
- src/
Entity/ CslStyle.php, line 133
Class
- CslStyle
- Defines the CSL style entity.
Namespace
Drupal\bibcite\EntityCode
public function calculateHash() {
$xml = simplexml_load_string($this->csl);
return hash('sha256', $xml
->asXML());
}