View | Details | Raw Unified | Return to bug 23185
Collapse All | Expand All

(-)a/Koha/Objects.pm (-3 / +14 lines)
Lines 118-126 sub find_or_create { Link Here
118
    return $object;
118
    return $object;
119
}
119
}
120
120
121
=head3 Koha::Objects->search();
121
=head3 search
122
123
    # list context
124
    my @objects = Koha::Objects->search([$params, $attributes]);
125
    # scalar context
126
    my $objects = Koha::Objects->search([$params, $attributes]);
127
    while (my $object = $objects->next) {
128
        do_stuff($object);
129
    }
130
131
This B<instantiates> the I<Koha::Objects> class, and generates a resultset
132
based on the query I<$params> and I<$attributes> that are passed (like in DBIC).
122
133
123
my @objects = Koha::Objects->search($params);
134
In B<list context> it returns an array of I<Koha::Object> objects.
135
In B<scalar context> it returns an iterator.
124
136
125
=cut
137
=cut
126
138
127
- 

Return to bug 23185