![]() |
Language Reference » pCache functions » getHash
|
|
Latest updates
Toolbox
Google AdSense
|
getHash - Returns the hash of a pData object This function allows you to calculate the (nearly) unique hash of a pData object. This hash can be used to match a picture with an unique ID in the cache database. Speaking with figures, you have only one chance on 2339099464253592691 tries to find two pData objects with the same ID, we can safely rely on it to identify different charts. Moreover, you can use the Marker parameter to specify which chart template you‘re using, so same data on different charts layout will get different IDs. Calling this function
getHash($Data,$Marker="") $Data is a pData object.
$Marker is an optional parameter allowing you to create different ID even if the pData objet is the same. Sample script This will display the unique ID of the given pData object. /* Include all the classes */ include("class/pData.class.php"); include("class/pCache.class.php"); /* Create your dataset object */ $myData = new pData(); /* Add data in your dataset */ $myData->addPoints(array(1,3,4,3,5)); /* Create the cache object */ $myCache = new pCache(); /* Compute the hash linked to the chart data */ echo $myCache->getHash($myData);
© Copyrights
Components used on this web site : Famfamfam icons has been made by Mark James, Rounded corners lite has been coded by Cameron Cooke and Tim Hutchison, SyntaxHighlighter has
been written by Alex Gorbatchev. pChart and this web site have been created by Jean-Damien POGOLOTTI. This documentation contains 185 pages and 56 comments. 415 users have registered.
This page has been rendered in 0,04 seconds. Wiki revision 1.37.
|