public static function fromRecord($record)
    {
        if (!$record) {
            return null;
        }
        $className = get_called_class();
        $entity = new $className;
        foreach ($record as $key => $value) {
            $entity->$key = $value;
        }
        return $entity;
    }
public static function fromRecord($record)
    {
        if (!$record) {
            return null;
        }
        $className = get_called_class();
        $entity = new $className;
        foreach ($record as $key => $value) {
            $entity->$key = $value;
        }
        return $entity;
    }
public static function fromRecord ( $ record ) { if ( ! $ record ) { return null ; } $ className = get_called_class ( ) ; $ entity = new $ className ; foreach ( $ record as $ key => $ value ) { $ entity -> $ key = $ value ; } return $ entity ; }
Default mapping of fields
@param array|null $record Record with data
Default mapping of fields