+ $this->mImages = array();
+ $this->mShowBytes = true;
+ $this->mShowFilename = true;
+ }
+
+ /**
+ * Add an image to the gallery.
+ *
+ * @param Image $image Image object that is added to the gallery
+ * @param string $html Additional HTML text to be shown. The name and size of the image are always shown.
+ */
+ function add( $image, $html='' ) {
+ $this->mImages[] = array( &$image, $html );
+ }
+
+ /**
+ * Add an image at the beginning of the gallery.
+ *
+ * @param Image $image Image object that is added to the gallery
+ * @param string $html Additional HTML text to be shown. The name and size of the image are always shown.
+ */
+ function insert( $image, $html='' ) {
+ array_unshift( $this->mImages, array( &$image, $html ) );
+ }
+
+
+ /**
+ * isEmpty() returns false iff the gallery doesn't contain any images
+ */
+ function isEmpty() {
+ return empty( $this->mImages );