src/MapperTrait.php
public function mapObjectsToRows($objects, $meta=null, $context=null)
    {
        if (!$objects) { return []; }

        if (!$meta instanceof Meta) {
            $meta = $this->getMeta($meta ?: get_class(current($objects)));
        }

        $out = [];
        foreach ($objects as $key => $object) {
            $out[$key] = $this->mapObjectToRow($object, $meta, $context);
        }
        return $out;
    }
public function mapObjectsToRows($objects, $meta=null, $context=null)
    {
        if (!$objects) { return []; }

        if (!$meta instanceof Meta) {
            $meta = $this->getMeta($meta ?: get_class(current($objects)));
        }

        $out = [];
        foreach ($objects as $key => $object) {
            $out[$key] = $this->mapObjectToRow($object, $meta, $context);
        }
        return $out;
    }
public function mapObjectsToRows ( $ objects , $ meta = null , $ context = null ) { if ( ! $ objects ) { return [ ] ; } if ( ! $ meta instanceof Meta ) { $ meta = $ this -> getMeta ( $ meta ? : get_class ( current ( $ objects ) ) ) ; } $ out = [ ] ; foreach ( $ objects as $ key => $ object ) { $ out [ $ key ] = $ this -> mapObjectToRow ( $ object , $ meta , $ context ) ; } return $ out ; }
Get row values from a list of objects

This will almost always have the exact same body. This is provided for
convenience, commented out below the definition.

@param $meta Amiss\Meta or string used to call getMeta()
Get row values from a list of objects