← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/share/koha/opac/cgi-bin/opac/opac-search.pl
  Run on Tue Oct 15 17:10:45 2013
Reported on Tue Oct 15 17:12:44 2013

Filename/usr/share/koha/lib/C4/Category.pm
StatementsExecuted 11 statements in 399µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11118µs22µsC4::Category::::BEGIN@21C4::Category::BEGIN@21
11111µs24µsC4::Category::::BEGIN@22C4::Category::BEGIN@22
11111µs12µsC4::Category::::BEGIN@23C4::Category::BEGIN@23
0000s0sC4::Category::::AUTOLOADC4::Category::AUTOLOAD
0000s0sC4::Category::::DESTROYC4::Category::DESTROY
0000s0sC4::Category::::allC4::Category::all
0000s0sC4::Category::::newC4::Category::new
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package C4::Category;
2
3# Copyright 2009 Liblime
4# Parts Copyright 2011 Tamil
5#
6# This file is part of Koha.
7#
8# Koha is free software; you can redistribute it and/or modify it under the
9# terms of the GNU General Public License as published by the Free Software
10# Foundation; either version 2 of the License, or (at your option) any later
11# version.
12#
13# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
14# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License along
18# with Koha; if not, write to the Free Software Foundation, Inc.,
19# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
21328µs226µs
# spent 22µs (18+4) within C4::Category::BEGIN@21 which was called: # once (18µs+4µs) by C4::ItemCirculationAlertPreference::BEGIN@23 at line 21
use strict;
# spent 22µs making 1 call to C4::Category::BEGIN@21 # spent 4µs making 1 call to strict::import
22327µs236µs
# spent 24µs (11+12) within C4::Category::BEGIN@22 which was called: # once (11µs+12µs) by C4::ItemCirculationAlertPreference::BEGIN@23 at line 22
use warnings;
# spent 24µs making 1 call to C4::Category::BEGIN@22 # spent 12µs making 1 call to warnings::import
233341µs214µs
# spent 12µs (11+2) within C4::Category::BEGIN@23 which was called: # once (11µs+2µs) by C4::ItemCirculationAlertPreference::BEGIN@23 at line 23
use C4::Context;
# spent 12µs making 1 call to C4::Category::BEGIN@23 # spent 2µs making 1 call to C4::Context::import
24
251200nsour $AUTOLOAD;
26
- -
30=head1 NAME
31
- -
54=head3 C4::Category->new(\%opts)
55
- -
61sub new {
62 my ($class, $opts) = @_;
63 bless $opts => $class;
64}
65
- -
69=head3 C4::Category->all
70
- -
76sub all {
77 my ( $class ) = @_;
78 my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
79 my $dbh = C4::Context->dbh;
80 # The categories table is small enough for
81 # `SELECT *` to be harmless.
82 my $query = "SELECT categories.* FROM categories";
83 $query .= qq{
84 LEFT JOIN categories_branches ON categories_branches.categorycode = categories.categorycode
85 WHERE categories_branches.branchcode = ? OR categories_branches.branchcode IS NULL
86 } if $branch_limit;
87 $query .= " ORDER BY description";
88 return map { $class->new($_) } @{
89 $dbh->selectall_arrayref(
90 $query,
91 { Slice => {} },
92 $branch_limit ? $branch_limit : ()
93 )
94 };
95}
96
- -
100=head2 Object Methods
101
- -
108=head3 $category->description
109
- -
112=head3 $category->enrolmentperiod
113
- -
116=head3 $category->upperagelimit
117
- -
120=head3 $category->dateofbirthrequired
121
- -
124=head3 $category->finetype
125
- -
128=head3 $category->bulk
129
- -
132=head3 $category->enrolmentfee
133
- -
136=head3 $category->overduenoticerequired
137
- -
140=head3 $category->issuelimit
141
- -
144=head3 $category->reservefee
145
- -
148=head3 $category->category_type
149
- -
152sub AUTOLOAD {
153 my $self = shift;
154 my $attr = $AUTOLOAD;
155 $attr =~ s/.*://;
156 if (exists $self->{$attr}) {
157 return $self->{$attr};
158 } else {
159 return undef;
160 }
161}
162
163sub DESTROY { }
164
- -
168=head1 SEE ALSO
169
- -
18113µs1;