Source of file Error.php
Size: 0,534 Bytes - Last Modified: 2021-12-23T10:29:23+00:00
/var/www/docs.ssmods.com/process/src/code/errors/Error.php
123456789101112131415161718192021222324252627282930 | <?php // TODO add request info class Error extends DataObject { private static $db = array( 'Hash' => 'Text', ); public static function generateHash($file, $line){ return md5($file . '-' . $line); } /** * @return ErrorOccurance */ public function LatestOccurance(){ return ErrorOccurance::get()->filter('Hash', $this->Hash)->sort('Created', 'DESC')->limit(1)->first(); } /** * @return int */ public function NumOccurances(){ return ErrorOccurance::get()->filter('Hash', $this->Hash)->count(); } } |