ezcSearchDefinitionDocumentField) */ public $fields = array(); /** * Creates a new ezcSearchDocumentDefinition for document type $documentType. * * @param string $documentType */ public function __construct( $documentType ) { $this->documentType = $documentType; } /** * Returns a list with all the field names * * @return array(string) */ public function getFieldNames() { return array_keys( $this->fields ); } /** * Returns all the field names that should appear in the search result * * @return array(string) */ public function getSelectFieldNames() { $fields = array(); foreach ( $this->fields as $name => $def ) { if ( $def->inResult ) { $fields[] = $name; } } return $fields; } /** * Returns all the field names that should appear in the highlighted fields * * @return array(string) */ public function getHighlightFieldNames() { $fields = array(); foreach ( $this->fields as $name => $def ) { if ( $def->highlight ) { $fields[] = $name; } } return $fields; } } ?>