public static function import($records)
    {
        $objects = array();
        $className = get_called_class();
        $defaults = self::schema()->defaults();

        foreach ($records as $record) {
            $objects []= $className::fromArray()
                ->load(array_merge($defaults, $record))->markSaved(false)->save();
        }

        return $objects;
    }
public static function import($records)
    {
        $objects = array();
        $className = get_called_class();
        $defaults = self::schema()->defaults();

        foreach ($records as $record) {
            $objects []= $className::fromArray()
                ->load(array_merge($defaults, $record))->markSaved(false)->save();
        }

        return $objects;
    }
public static function import ( $ records ) { $ objects = array ( ) ; $ className = get_called_class ( ) ; $ defaults = self :: schema ( ) -> defaults ( ) ; foreach ( $ records as $ record ) { $ objects [ ] = $ className :: fromArray ( ) -> load ( array_merge ( $ defaults , $ record ) ) -> markSaved ( false ) -> save ( ) ; } return $ objects ; }
Creates and saves a array or arrays as domain objects
@return array of saved domain objects
Creates and saves a array or arrays as domain objects