whitespace clean up
[catagits/Catalyst-Controller-DBIC-API.git] / lib / Catalyst / Controller / DBIC / API / Request / Context.pm
1 package Catalyst::Controller::DBIC::API::Request::Context;
2
3 #ABSTRACT: Provides additional context to the Request
4 use Moose::Role;
5 use MooseX::Types::Moose(':all');
6 use MooseX::Types::Structured('Tuple');
7 use Catalyst::Controller::DBIC::API::Types(':all');
8 use namespace::autoclean;
9
10 =attribute_public objects is: ro, isa ArrayRef[Tuple[Object,Maybe[HashRef]]], traits: ['Array']
11
12 This attribute stores the objects found/created at the object action. It handles the following methods:
13
14     all_objects => 'elements'
15     add_object => 'push'
16     count_objects => 'count'
17     has_objects => 'count'
18     clear_objects => 'clear'
19
20 =cut
21
22 has objects =>
23 (
24     is => 'ro',
25     isa => ArrayRef[ Tuple[ Object, Maybe[HashRef] ] ],
26     traits => [ 'Array' ],
27     default => sub { [] },
28     handles =>
29     {
30         all_objects => 'elements',
31         add_object => 'push',
32         count_objects => 'count',
33         has_objects => 'count',
34         clear_objects => 'clear',
35         get_object => 'get',
36     },
37 );
38
39 =attribute_public current_result_set is: ro, isa: L<Catalyst::Controller::DBIC::API::Types/ResultSet>
40
41 Stores the current ResultSet derived from the initial L<Catalyst::Controller::DBIC::API::StoredResultSource/stored_model>.
42
43 =cut
44
45 has current_result_set =>
46 (
47     is => 'ro',
48     isa =>  ResultSet,
49     writer => '_set_current_result_set',
50 );
51
52 1;