public function splitByClass()
    {

        $classes = array();
        foreach( $this->collection as $key => $entity ) {
            $classes[get_class($entity)][] = $key;
        }
        ksort( $classes );

        $output = array();
        foreach( $classes as $class => $splHashes ) {
            $container = $this->newContainer();
            $container->class = $class;
            $container->collection = array_intersect_key(
                $this->collection,
                array_flip( $splHashes )
            );
            $output[$class] = $container;
        }
        return $output;

    }