/usr/share/horde/ansel/lib/GalleryMode/Base.php is in php-horde-ansel 3.0.5+debian0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | <?php
/**
* Ansel_GalleryMode_Base:: Class for encapsulating gallery methods that
* depend on the current display mode of the gallery.
*
* Copyright 2008-2016 Horde LLC (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (GPL). If you
* did not receive this file, see http://www.horde.org/licenses/gpl.
*
* @author Michael J. Rubinsky <mrubinsk@horde.org>
* @package Ansel
*/
abstract class Ansel_GalleryMode_Base
{
const MODE_NORMAL = 0;
const MODE_DATE = 1;
/**
* @var Ansel_Gallery
*/
protected $_gallery;
/**
*
* @var array
*/
protected $_features = array();
/**
* Constructor
*
* @param Ansel_Gallery $gallery The gallery to bind to.
*
* @return Ansel_GalleryMode_Base
*/
public function __construct($gallery)
{
$this->_gallery = $gallery;
}
public function hasFeature($feature)
{
return in_array($feature, $this->_features);
}
/**
* @TODO: Figure out if we can get rid of this and only include it in the
* objects that actually need it.
* @param array $date Date parts array
*/
public function setDate($date = array())
{
}
/**
*
* @return array Date parts array.
*/
public function getDate()
{
return array();
}
/**
* Get the children of this gallery.
*
* @param integer $perm The permissions to limit to.
* @param integer $from The child to start at.
* @param integer $count The number of children to return.
*
* @return array A mixed array of Ansel_Gallery and Ansel_Image objects
* that are children of this gallery.
*/
abstract public function getGalleryChildren($perm = Horde_Perms::SHOW, $from = 0, $to = 0);
/**
* Return the count this gallery's children
*
* @param integer $perm The permissions to require.
* @param boolean $galleries_only Only include galleries, no images.
*
* @return integer The count of this gallery's children.
*/
abstract public function countGalleryChildren($perm = Horde_Perms::SHOW, $galleries_only = false);
/**
* Get an array describing where this gallery is in a breadcrumb trail.
*
* @return An array of 'title' and 'navdata' hashes with the [0] element
* being the deepest part.
*/
abstract public function getGalleryCrumbData();
/**
* List a slice of the image ids in this gallery.
*
* @param integer $from The image to start listing.
* @param integer $count The numer of images to list.
*
* @return array An array of image_ids
*/
abstract public function listImages($from = 0, $count = 0);
/**
* Gets a slice of the images in this gallery.
*
* @param integer $from The image to start fetching.
* @param integer $count The numer of images to return.
*
* @param array An array of Ansel_Image objects
*/
abstract public function getImages($from = 0, $count = 0);
/**
* Move images from this gallery to another.
*
* @param array $images The image ids to move.
* @param Ansel_Gallery $gallery The gallery to move images into.
*
* @return boolean
* @throws Ansel_Exception
* @throws Horde_Exception_PermissionDenied
*/
abstract public function moveImagesTo($images, $gallery);
/**
* Remove an image from Ansel.
*
* @param integer | Ansel_Image $image The image id or object
* @param boolean $isStack This represents a stack image
*
* @return boolean
*/
abstract public function removeImage($image, $isStack);
/**
* Checks if the gallery has any subgallery
*
* @return boolean
*/
abstract public function hasSubGalleries();
/**
* Returns the number of images in this gallery and, optionally, all
* sub-galleries.
*
* @param boolean $subgalleries Determine whether subgalleries should
* be counted or not.
*
* @return integer The number of images in this gallery
*/
abstract public function countImages($subgalleries = false);
}
|