public function where($field, $section = 'Reference') {
		// default to reference
		if($section === null) {
			$section = 'Reference';
		}
		// array_values reindexes the array here, otherwise we have gaps from non-matching array keys
		return new FilterableList(array_values(array_filter($this->sections, function(Section $val) use ($section) {
			// only return matching root sections
			return $val->getHeading() == $section;
		})), $field);
	}
public function where($field, $section = 'Reference') {
		// default to reference
		if($section === null) {
			$section = 'Reference';
		}
		// array_values reindexes the array here, otherwise we have gaps from non-matching array keys
		return new FilterableList(array_values(array_filter($this->sections, function(Section $val) use ($section) {
			// only return matching root sections
			return $val->getHeading() == $section;
		})), $field);
	}
public function where ( $ field , $ section = 'Reference' ) { // default to reference if ( $ section === null ) { $ section = 'Reference' ; } // array_values reindexes the array here, otherwise we have gaps from non-matching array keys return new FilterableList ( array_values ( array_filter ( $ this -> sections , function ( Section $ val ) use ( $ section ) { // only return matching root sections return $ val -> getHeading ( ) == $ section ; } ) ) , $ field ) ; }
Sets the field for the first filter.
@param string $field the field to filter
@return FilterableList
Sets the field for the first filter .