/** * Get all entities * * @param integer $first * @param integer $limit * @param string $entityType * @throws Exception * @return array */ public function getAllEntities($first, $limit, $entityType = null) { if (null != ($entities = $this->searchEntityDao->findAllEntities($first, $limit, $entityType))) { // get entities' tags foreach ($entities as &$entity) { if (null != ($tags = $this->searchEntityTagDao->findTags($entity['id']))) { foreach ($tags as $tag) { $entity['tags'][] = $tag->entityTag; } } } } return $entities; }
/** * Returns an instance of class (singleton pattern implementation). * * @return BOL_SearchEntityDao */ public static function getInstance() { if (self::$classInstance === null) { self::$classInstance = new self(); } return self::$classInstance; }