src/Charcoal/Loader/CollectionLoader.php
protected function processCollection($results, callable $before = null, callable $after = null)
    {
        $collection   = $this->createCollection();
        foreach ($results as $objData) {
            $obj = $this->processModel($objData, $before, $after);

            if ($obj instanceof ModelInterface) {
                $collection[] = $obj;
            }
        }

        return $collection;
    }
protected function processCollection($results, callable $before = null, callable $after = null)
    {
        $collection   = $this->createCollection();
        foreach ($results as $objData) {
            $obj = $this->processModel($objData, $before, $after);

            if ($obj instanceof ModelInterface) {
                $collection[] = $obj;
            }
        }

        return $collection;
    }
protected function processCollection ( $ results , callable $ before = null , callable $ after = null ) { $ collection = $ this -> createCollection ( ) ; foreach ( $ results as $ objData ) { $ obj = $ this -> processModel ( $ objData , $ before , $ after ) ; if ( $ obj instanceof ModelInterface ) { $ collection [ ] = $ obj ; } } return $ collection ; }
Process the collection of raw data.

@param  mixed[]|Traversable $results The raw result set.
@param  callable|null       $before  Process each entity before applying raw data.
@param  callable|null       $after   Process each entity after applying raw data.
@return ModelInterface[]|ArrayAccess
Process the collection of raw data .