src/Record.php
public static function parse($record): Record
    {
        if ($record instanceof Record) {
            return $record;
        }
        if ($record instanceof stdClass) {
            $record = (array)$record;
        }
        if (is_array($record)) {
            return static::make($record);
        }
        $type = gettype($record);
        if ($type === TYPE_OBJECT) {
            $type = get_class($type);
        }
        throw new SimplesRunTimeError("Record must be an array or instanceof Record '{$type}' given");
    }
public static function parse($record): Record
    {
        if ($record instanceof Record) {
            return $record;
        }
        if ($record instanceof stdClass) {
            $record = (array)$record;
        }
        if (is_array($record)) {
            return static::make($record);
        }
        $type = gettype($record);
        if ($type === TYPE_OBJECT) {
            $type = get_class($type);
        }
        throw new SimplesRunTimeError("Record must be an array or instanceof Record '{$type}' given");
    }
public static function parse ( $ record ) : Record { if ( $ record instanceof Record ) { return $ record ; } if ( $ record instanceof stdClass ) { $ record = ( array ) $ record ; } if ( is_array ( $ record ) ) { return static :: make ( $ record ) ; } $ type = gettype ( $ record ) ; if ( $ type === TYPE_OBJECT ) { $ type = get_class ( $ type ) ; } throw new SimplesRunTimeError ( "Record must be an array or instanceof Record '{$type}' given" ) ; }
Convert data into a Record instance
@param $record
@return Record
@throws SimplesRunTimeError
Convert data into a Record instance