public function logTypeId($object)
    {
        $reflection = new ReflectionClass($object);
        $filename   = $reflection->getFileName();

        $match = null;

        if (!preg_match("'src(.*?)src'si", $filename, $match)) {
            throw new Exception('Unable to resolve current module name.');
        }
        if (!isset($match[1])) {
            throw new Exception('Unable to resolve current module namespace.');
        }

        $reserved = [
            'components', 'modules'
        ];
        $name     = (str_contains($match[1], 'core')) ? 'core' : trim(str_replace($reserved, '', $match[1]), DIRECTORY_SEPARATOR);
        return $this->getLogTypeByName($name);
    }
public function logTypeId($object)
    {
        $reflection = new ReflectionClass($object);
        $filename   = $reflection->getFileName();

        $match = null;

        if (!preg_match("'src(.*?)src'si", $filename, $match)) {
            throw new Exception('Unable to resolve current module name.');
        }
        if (!isset($match[1])) {
            throw new Exception('Unable to resolve current module namespace.');
        }

        $reserved = [
            'components', 'modules'
        ];
        $name     = (str_contains($match[1], 'core')) ? 'core' : trim(str_replace($reserved, '', $match[1]), DIRECTORY_SEPARATOR);
        return $this->getLogTypeByName($name);
    }
public function logTypeId ( $ object ) { $ reflection = new ReflectionClass ( $ object ) ; $ filename = $ reflection -> getFileName ( ) ; $ match = null ; if ( ! preg_match ( "'src(.*?)src'si" , $ filename , $ match ) ) { throw new Exception ( 'Unable to resolve current module name.' ) ; } if ( ! isset ( $ match [ 1 ] ) ) { throw new Exception ( 'Unable to resolve current module namespace.' ) ; } $ reserved = [ 'components' , 'modules' ] ; $ name = ( str_contains ( $ match [ 1 ] , 'core' ) ) ? 'core' : trim ( str_replace ( $ reserved , '' , $ match [ 1 ] ) , DIRECTORY_SEPARATOR ) ; return $ this -> getLogTypeByName ( $ name ) ; }
get instance of log type

@param mixed $object
@return numeric
get instance of log type