Пример #1
0
 /**
  * Sets an additional list of user records to also load and cache with next SQL query
  * e.g.:
  * CBuser::advanceNoticeOfUsersNeeded( array( 66, 67, 65 ) );		// just remembers
  * CBuser::advanceNoticeOfUsersNeeded( array( 64, 65 ) );			// just remembers
  * echo CBuser::getUserDataInstance( 64 )->id;		// echo's 64	// and loads 64-67
  * CBuser::advanceNoticeOfUsersNeeded( array( 68, 67, 69, 71 ) );	// just remembers
  * echo CBuser::getUserDataInstance( 67 )->id;		// echos 67		// and doesn't load
  * echo CBuser::getUserDataInstance( 69 )->username;	// echos	// and loads 68,69,71
  *
  * @param  int[] $usersIds
  * @return void
  */
 public static function advanceNoticeOfUsersNeeded($usersIds)
 {
     self::$idsToLoad = array_unique(array_merge(self::$idsToLoad, $usersIds));
 }