public static function makeCollection($rows)
    {
        $collection = [];
        foreach ($rows as $row)
        {
            $obj = new static;
            $collection[] = $obj->setAttributes(get_object_vars($row));
        }
        return $collection;
    }
public static function makeCollection($rows)
    {
        $collection = [];
        foreach ($rows as $row)
        {
            $obj = new static;
            $collection[] = $obj->setAttributes(get_object_vars($row));
        }
        return $collection;
    }
public static function makeCollection ( $ rows ) { $ collection = [ ] ; foreach ( $ rows as $ row ) { $ obj = new static ; $ collection [ ] = $ obj -> setAttributes ( get_object_vars ( $ row ) ) ; } return $ collection ; }
Mace collection of objects

@param $rows
@return array
Mace collection of objects