mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
46 lines
1002 B
PHP
46 lines
1002 B
PHP
<?php
|
|
|
|
namespace App\Classes\General;
|
|
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
use Illuminate\Support\Str;
|
|
|
|
class Helper
|
|
{
|
|
|
|
/**
|
|
* @param string $methodName
|
|
* @return string
|
|
*/
|
|
static function getPropertyName(string $methodName){
|
|
return Str::snake(str_replace('get', '', $methodName));
|
|
}
|
|
|
|
/**
|
|
* @param string $className
|
|
* @return array
|
|
*/
|
|
static function getClassMethodsArray(string $className){
|
|
return array_slice(get_class_methods($className), 1);
|
|
}
|
|
|
|
/**
|
|
* @param $log
|
|
* @return array
|
|
*/
|
|
static function debugLoggerForPerfexCRM($log){
|
|
if($log){
|
|
$message = $log['message'];
|
|
$substring = 'No data were found';
|
|
if (isset($message)) {
|
|
if (strpos($message, $substring) !== false) {
|
|
// Log::info('Message exist');
|
|
} else {
|
|
Log::info($log['message']);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|