Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
701 B
PHP
Raw Permalink Normal View History

2018-05-09 08:05:17 -05:00
<?php
namespace App\Models;
2019-01-22 17:04:28 -06:00
class Processor extends DeviceRelatedModel
2018-05-09 08:05:17 -05:00
{
public $timestamps = false;
protected $primaryKey = 'processor_id';
// ---- Helper Functions ----
/**
* Return Processor Description, formatted for display
*
* @return string
*/
public function getFormattedDescription()
{
$bad_descr = [
'GenuineIntel:',
'AuthenticAMD:',
'Intel(R)',
'CPU',
'(R)',
'(tm)',
];
$descr = str_replace($bad_descr, '', $this->processor_descr);
// reduce extra spaces
$descr = str_replace(' ', ' ', $descr);
return $descr;
}
}