aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Model/PhotoSet.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Model/PhotoSet.pm')
-rw-r--r--perllib/FixMyStreet/App/Model/PhotoSet.pm20
1 files changed, 19 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Model/PhotoSet.pm b/perllib/FixMyStreet/App/Model/PhotoSet.pm
index fa6eb060b..5d75b62dc 100644
--- a/perllib/FixMyStreet/App/Model/PhotoSet.pm
+++ b/perllib/FixMyStreet/App/Model/PhotoSet.pm
@@ -71,7 +71,25 @@ sub _jpeg_magic {
# and \x{49}\x{49} (Tiff, 3 results in live DB) ?
}
-has images => ( # jpeg data for actual image
+=head2 C<images>, C<num_images>, C<get_raw_image_data>, C<all_images>
+
+C<$photoset-E<GT>images> is an AoA containing the filed and the binary image data.
+
+ [
+ [ $fileid1, $binary_data ],
+ [ $fileid2, $binary_data ],
+ ...
+ ]
+
+Various accessors are provided onto it:
+
+ num_images: count
+ get_raw_image_data ($index): return the [$fileid, $binary_data] tuple
+ all_images: return AoA as an array (e.g. rather than arrayref)
+
+=cut
+
+has images => ( # AoA of [$fileid, $binary_data] tuples
isa => 'ArrayRef',
is => 'rw',
traits => ['Array'],