return \@return_values;
}
-=head3 lib_opac
+=head3 opac_description
-my $description = $av->lib_opac();
-
-$av->lib_opac( $description );
+my $description = $av->opac_description();
=cut
return $self->lib_opac() || $self->lib();
}
-=head3 Koha::Objects->_avb_resultset
+=head3 _avb_resultset
Returns the internal resultset or creates it if undefined
use Koha::Cache;
my $cache = Koha::Cache->new({cache_type => $cache_type, %params});
+ # see also Koha::Caches->get_instance;
+
=head1 DESCRIPTION
Koha caching routines. This class provides two interfaces for cache access.
=head1 FUNCTIONS
=cut
+
use strict;
use warnings;
use Carp;
our $L1_encoder = Sereal::Encoder->new;
our $L1_decoder = Sereal::Decoder->new;
-=head2 get_instance
-
- my $cache = Koha::Caches->get_instance();
-
-This gets a shared instance of the cache, set up in a very default way. This is
-the recommended way to fetch a cache object. If possible, it'll be
-persistent across multiple instances.
-
-=cut
-
=head2 new
Create a new Koha::Cache object. This is required for all cache-related functionality.
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
+=head1 NAME
+
+Koha::Caches - Cache handling
+
+=head1 SYNOPSIS
+
+my $cache = Koha::Caches->get_instance();
+
+=head1 DESCRIPTION
+
+Description
+
+=head1 CLASS METHODS
+
+=cut
+
use Modern::Perl;
use Koha::Cache;
our $singleton_caches;
+
+=head2 get_instance
+
+This gets a shared instance of the cache, set up in a very default way. This is
+the recommended way to fetch a cache object. If possible, it'll be
+persistent across multiple instances.
+
+=cut
+
sub get_instance {
my ($class, $subnamespace) = @_;
$subnamespace //= '';
return $singleton_caches->{$subnamespace};
}
+=head2 flush_L1_caches
+
+=cut
+
sub flush_L1_caches {
return unless $singleton_caches;
for my $cache ( values %$singleton_caches ) {
return $old_issues->count; # 0 || N
}
-=head2 is_debarred
+=head3 is_debarred
my $debarment_expiration = $patron->is_debarred;
return;
}
-=head2 is_expired
+=head3 is_expired
my $is_expired = $patron->is_expired;
return 0;
}
-=head2 is_going_to_expire
+=head3 is_going_to_expire
my $is_going_to_expire = $patron->is_going_to_expire;
return 0;
}
-=head2 update_password
+=head3 update_password
my $updated = $patron->update_password( $userid, $password );
return dt_from_string( $expiry_date )->truncate( to => 'day' );
}
-=head2 has_overdues
+=head3 has_overdues
my $has_overdues = $patron->has_overdues;
return $self->_result->issues->search({ date_due => { '<' => $dtf->format_datetime( dt_from_string() ) } })->count;
}
-=head2 track_login
+=head3 track_login
$patron->track_login;
$patron->track_login({ force => 1 });
$self->lastseen( dt_from_string() )->store;
}
-=head2 move_to_deleted
+=head3 move_to_deleted
my $is_moved = $patron->move_to_deleted;
This will return a list of all available plugins, optionally limited by
method or metadata value.
- my @plugins = C4::Plugins::GetPlugins({
+ my @plugins = Koha::Plugins::GetPlugins({
method => 'some_method',
metadata => { some_key => 'some_value' },
});
};
# Protect again simultaneous update of the zebra index by using a lock file.
-# Create our own lock directory if its missing. This shouild be created
-# by koha-zebra-ctl.sh or at system installation. If the desired directory
+# Create our own lock directory if it is missing. This should be created
+# by koha-zebra-ctl.sh or at system installation. If the desired directory
# does not exist and cannot be created, we fall back on /tmp - which will
# always work.
=head1 DESCRIPTION
- Plugin that shows circulation stats
+ Plugin that shows reserve stats
=cut
is( Koha::Authorities->search->count, $nb_of_authorities + 2, 'The 2 authorities should have been added' );
$new_authority_1->delete;
-is( Koha::Authorities->search->count, $nb_of_authorities + 1, 'Delete should have deleted the library' );
+is( Koha::Authorities->search->count, $nb_of_authorities + 1, 'Delete should have deleted the authority' );
$schema->storage->txn_rollback;
1;