Source for file result.php
Documentation is available at result.php
* @package Joomla.Administrator
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Result class for the Finder indexer package.
* This class uses magic __get() and __set() methods to prevent properties
* being added that might confuse the system. All properties not explicitly
* declared will be pushed into the elements array and can be accessed
* explicitly using the getElement() method.
* @package Joomla.Administrator
* An array of extra result properties.
* This array tells the indexer which properties should be indexed and what
* weights to use for those properties.
FinderIndexer::TITLE_CONTEXT =>
array('title', 'subtitle', 'id'),
FinderIndexer::TEXT_CONTEXT =>
array('summary', 'body'),
FinderIndexer::META_CONTEXT =>
array('meta', 'list_price', 'sale_price'),
FinderIndexer::PATH_CONTEXT =>
array('path', 'alias'),
FinderIndexer::MISC_CONTEXT =>
array('comments')
* The indexer will use this data to create taxonomy mapping entries for
* the item so that it can be filtered by type, label, category,
* The content description.
* The published state of the result.
* The content published state.
* The content access level.
* The publishing start date.
* The publishing end date.
* The generic start date.
* The content type id. This is set by the adapter.
* The default language for content.
* The magic set method is used to push additional values into the elements
* array in order to preserve the cleanliness of the object.
* @param string $name The name of the element.
* @param mixed $value The value of the element.
public function __set($name, $value)
* The magic get method is used to retrieve additional element values
* from the elements array.
* @param string $name The name of the element.
* @return mixed The value of the element if set, null otherwise.
public function __get($name)
// Get the element value if set.
* The magic isset method is used to check the state of additional element
* values in the elements array.
* @param string $name The name of the element.
* @return boolean True if set, false otherwise.
* The magic unset method is used to unset additional element values in the
* @param string $name The name of the element.
* Method to retrieve additional element values from the elements array.
* @param string $name The name of the element.
* @return mixed The value of the element if set, null otherwise.
// Get the element value if set.
* Method to set additional element values in the elements array.
* @param string $name The name of the element.
* @param mixed $value The value of the element.
* Method to get all processing instructions.
* @return array An array of processing instructions.
* Method to add a processing instruction for an item property.
* @param string $group The group to associate the property with.
* @param string $property The property to process.
// Check if the group exists. We can't add instructions for unknown groups.
// Check if the property exists in the group.
// Add the property to the group.
* Method to remove a processing instruction for an item property.
* @param string $group The group to associate the property with.
* @param string $property The property to process.
// Check if the group exists. We can't remove instructions for unknown groups.
// Search for the property in the group.
// If the property was found, remove it.
* Method to get the taxonomy maps for an item.
* @param string $branch The taxonomy branch to get. [optional]
* @return array An array of taxonomy maps.
// Get the taxonomy branch if available.
if ($branch !==
null && isset
($this->taxonomy[$branch]))
$branch =
preg_replace('#[^\pL\pM\pN\p{Pi}\p{Pf}\'+-.,]+#mui', ' ', $branch);
* Method to add a taxonomy map for an item.
* @param string $branch The title of the taxonomy branch to add the node to.
* @param string $title The title of the taxonomy node.
* @param integer $state The published state of the taxonomy node. [optional]
* @param integer $access The access level of the taxonomy node. [optional]
public function addTaxonomy($branch, $title, $state =
1, $access =
1)
$branch =
preg_replace('#[^\pL\pM\pN\p{Pi}\p{Pf}\'+-.,]+#mui', ' ', $branch);
// Create the taxonomy node.
$node->state = (int)
$state;
$node->access = (int)
$access;
// Add the node to the taxonomy branch.
$this->taxonomy[$branch][$node->title] =
$node;
* Method to set the item language
Documentation generated on Tue, 19 Nov 2013 15:12:18 +0100 by phpDocumentor 1.4.3