public function searchItems( MW_Common_Criteria_Interface $search, array $ref = array(), &$total = null )
	{
		$items = array();

		$dbm = $this->_context->getDatabaseManager();
		$dbname = $this->_getResourceName();
		$conn = $dbm->acquire( $dbname );

		try
		{
			$domain = explode( '.', $this->_prefix);

			if ( ( $topdomain = array_shift($domain) ) === null ) {
				throw new MShop_Exception('No configuration available.');
			}

			$level = MShop_Locale_Manager_Abstract::SITE_ALL;
			$cfgPathSearch = $this->_config['search'];
			$cfgPathCount =  $this->_config['count'];
			$required = array( trim( $this->_prefix, '.' ) );

			$results = $this->_searchItems( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level );
			while( ( $row = $results->fetch() ) !== false ) {
				$items[ $row['id'] ] = $this->_createItem( $row );
			}

			$dbm->release( $conn, $dbname );
		}
		catch( Exception $e )
		{
			$dbm->release( $conn, $dbname );
			throw $e;
		}

		return $items;
	}
public function searchItems( MW_Common_Criteria_Interface $search, array $ref = array(), &$total = null )
	{
		$items = array();

		$dbm = $this->_context->getDatabaseManager();
		$dbname = $this->_getResourceName();
		$conn = $dbm->acquire( $dbname );

		try
		{
			$domain = explode( '.', $this->_prefix);

			if ( ( $topdomain = array_shift($domain) ) === null ) {
				throw new MShop_Exception('No configuration available.');
			}

			$level = MShop_Locale_Manager_Abstract::SITE_ALL;
			$cfgPathSearch = $this->_config['search'];
			$cfgPathCount =  $this->_config['count'];
			$required = array( trim( $this->_prefix, '.' ) );

			$results = $this->_searchItems( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level );
			while( ( $row = $results->fetch() ) !== false ) {
				$items[ $row['id'] ] = $this->_createItem( $row );
			}

			$dbm->release( $conn, $dbname );
		}
		catch( Exception $e )
		{
			$dbm->release( $conn, $dbname );
			throw $e;
		}

		return $items;
	}
public function searchItems ( MW_Common_Criteria_Interface $ search , array $ ref = array ( ) , & $ total = null ) { $ items = array ( ) ; $ dbm = $ this -> _context -> getDatabaseManager ( ) ; $ dbname = $ this -> _getResourceName ( ) ; $ conn = $ dbm -> acquire ( $ dbname ) ; try { $ domain = explode ( '.' , $ this -> _prefix ) ; if ( ( $ topdomain = array_shift ( $ domain ) ) === null ) { throw new MShop_Exception ( 'No configuration available.' ) ; } $ level = MShop_Locale_Manager_Abstract :: SITE_ALL ; $ cfgPathSearch = $ this -> _config [ 'search' ] ; $ cfgPathCount = $ this -> _config [ 'count' ] ; $ required = array ( trim ( $ this -> _prefix , '.' ) ) ; $ results = $ this -> _searchItems ( $ conn , $ search , $ cfgPathSearch , $ cfgPathCount , $ required , $ total , $ level ) ; while ( ( $ row = $ results -> fetch ( ) ) !== false ) { $ items [ $ row [ 'id' ] ] = $ this -> _createItem ( $ row ) ; } $ dbm -> release ( $ conn , $ dbname ) ; } catch ( Exception $ e ) { $ dbm -> release ( $ conn , $ dbname ) ; throw $ e ; } return $ items ; }
Searches for all type items matching the given critera.

@param MW_Common_Criteria_Interface $search Search object with conditions
@param integer &$total Number of items that are available in total
@return array List of type items implementing MShop_Common_Item_Type_Interface
@throws MShop_Common_Exception if creating items failed
Searches for all type items matching the given critera .