More code optimisation
This commit is contained in:
@@ -60,7 +60,6 @@ class Frame
|
||||
|
||||
public function __construct(\App\Models\Frame $o,string $msg=NULL)
|
||||
{
|
||||
dump(__METHOD__);
|
||||
$this->frame = $o;
|
||||
|
||||
$this->output = $this->hasFlag('clear') ? CLS : HOME;
|
||||
@@ -94,6 +93,25 @@ class Frame
|
||||
return $this->output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of alternative versions of this frame.
|
||||
*/
|
||||
public function alts()
|
||||
{
|
||||
return \App\Models\Frame::where('frame',$this->frame())
|
||||
->where('index',$this->index())
|
||||
->where('id','<>',$this->frame->id)
|
||||
->limit(9);
|
||||
}
|
||||
|
||||
/**
|
||||
* Frame Created Date
|
||||
*/
|
||||
public function created()
|
||||
{
|
||||
return $this->frame->created_at;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the frame from Binary to Output
|
||||
* Look for fields within the frame.
|
||||
@@ -385,7 +403,7 @@ class Frame
|
||||
* @param $text
|
||||
* @return int
|
||||
*/
|
||||
function strlenv($text) {
|
||||
function strlenv($text):int {
|
||||
return strlen($text)-substr_count($text,ESC);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user