\SearchWP\Entry
\SearchWP\Entry is responsible for modeling an individual \SearchWP\Source entry.
Arguments
When instantiating a new \SearchWP\Entry the following arguments are considered:
source(string|\SearchWP\Source)- Either the
\SearchWP\Sourcenameor the\SearchWP\Sourceitself. (required) id(string)- The database row ID of the
\SearchWP\Source. (required) get_data(boolean)- Whether the data should be retrieved at instantiation. (default:
true) all_attributes(boolean)- Whether to retrieve all of the registered
\SearchWP\Attributedata, or only those that are used in an\SearchWP\Engine(default:false)
Methods
When working with \SearchWP\Entry there are a number of methods to consider.
get_id()- Getter for ID.
get_source()- Getter for
\SearchWP\Source. update_data( $all_attributes = false )- Updates data.
get_data()- Getter for data.
native()- Returns a version of this
\SearchWP\Entrythat the associated\SearchWP\Sourcewas modeled around e.g. for Posts a properWP_Postwill be returned, populated appropriately. - Note: Not all
\SearchWP\Attributes will be populated for core\SearchWP\Sources e.g. Custom Fields.
Hooks
There are a number of hooks available to further modify the behavior of \SearchWP\Entry:

