Class: CategoryItemEnumeration

Source Location: /CORE/system/classes/category/CategoryItemEnumeration.php

Class CategoryItemEnumeration

Class Overview

With the CategoryItemEnumeration you get all Item IDs of a known Itemtype that are linked to a known Category.

Example ========= Receive all Menus for the Category 2: $catItemEnum = new CategoryItemEnumeration(_BIGACE_ITEM_MENU, 2); for($i=0;$i<$catItemEnum->count();$i++) { $temp = $catItemEnum->next(); $temp_menu = new Menu($temp['itemid']); }

Located in /CORE/system/classes/category/CategoryItemEnumeration.php [line 47]



		
				Author(s):
		
  • Kevin Papst
Information Tags:
Version:  $Id: CategoryItemEnumeration.php,v 1.8 2008/02/23 19:56:39 kpapst Exp $
Copyright:  Copyright (C) Kevin Papst
License:  GNU Public License

Methods

[ Top ]
Method Summary
CategoryItemEnumeration   CategoryItemEnumeration()   Instatiate a CategoryItemEnumeration.
int   count()   Get the amount of Results.
boolean   hasNext()   Returns wheter there is one more Search result or not.
array   next()   Gets the next Result array.

[ Top ]
Methods
Constructor CategoryItemEnumeration  [line 64]

  CategoryItemEnumeration CategoryItemEnumeration( int $itemtypeid, int $categoryid  )

Instatiate a CategoryItemEnumeration.

Parameters:
int   $itemtypeid:  the Itemtype ID
int   $categoryid:  the CategoryID


[ Top ]
count  [line 79]

  int count( )

Get the amount of Results.


API Tags:
Return:  the amount of Items linked to the given Category


[ Top ]
hasNext  [line 98]

  boolean hasNext( )

Returns wheter there is one more Search result or not.


API Tags:
Return:  if there is at least one more serach result


[ Top ]
next  [line 89]

  array next( )

Gets the next Result array.

The Array has the usable Index "itemid".


API Tags:
Return:  the next result


[ Top ]