public function subset(array $keys)
    {
        $subset = clone $this;
        $items = $subset->getItems();
        $entries = array_intersect_key($subset->getItems()->getArrayCopy(), array_flip(array_values($keys)));
        $items->exchangeArray($entries);
        return $subset;
    }
public function subset(array $keys)
    {
        $subset = clone $this;
        $items = $subset->getItems();
        $entries = array_intersect_key($subset->getItems()->getArrayCopy(), array_flip(array_values($keys)));
        $items->exchangeArray($entries);
        return $subset;
    }
public function subset ( array $ keys ) { $ subset = clone $ this ; $ items = $ subset -> getItems ( ) ; $ entries = array_intersect_key ( $ subset -> getItems ( ) -> getArrayCopy ( ) , array_flip ( array_values ( $ keys ) ) ) ; $ items -> exchangeArray ( $ entries ) ; return $ subset ; }
Get a subset of the collection.

@param array $keys
@return mixed
Get a subset of the collection .