public function pick($field)
    {
        $result = array();

        foreach ($this->documents as $document) {
            if (isset($document->{$field})) {
                $result[] = $document->{$field};
            }
        }

        return $result;
    }
public function pick($field)
    {
        $result = array();

        foreach ($this->documents as $document) {
            if (isset($document->{$field})) {
                $result[] = $document->{$field};
            }
        }

        return $result;
    }
public function pick ( $ field ) { $ result = array ( ) ; foreach ( $ this -> documents as $ document ) { if ( isset ( $ document -> { $ field } ) ) { $ result [ ] = $ document -> { $ field } ; } } return $ result ; }
Returns an array where each value is a single property from each
document. If the property doesnt exist on the document then it won't
be in the returned array.

@param string $field The name of the field to pick.

@return array The array of values, one from each document.
Returns an array where each value is a single property from each document . If the property doesnt exist on the document then it won t be in the returned array .