<<

NAME

Koha::ERM::EUsage::CounterFile - Koha ErmCounterFile Object class

API

Class Methods

counter_logs

Return the counter_logs for this counter_file

store

    Koha::ERM::EUsage::CounterFile->new($counter_file)->store( $self->{job_callbacks} );

Stores the csv COUNTER file. Adds usage titles from the file. Adds the respective counter_log entry.

background_job_callbacks

Receive background_job_callbacks to be able to update job progress

get_usage_data_provider

Getter for the usage data provider of this counter_file

Internal methods

_add_usage_objects

Goes through COUNTER file and adds usage objects for each row A usage object may be a erm_usage_title, erm_usage_platform, erm_usage_item or erm_usage_database

#FIXME?: "Yearly" usage may be incorrect, it'll only add up the months in the current report, not necessarily the whole year

_add_monthly_usage_entries

Adds erm_usage_mus database entries

_add_yearly_usage_entries

Adds erm_usage_yus database entries

validate

Verifies if the given file_content is a valid COUNTER file or not

A I <Koha::Exceptions::ERM::EUsage::CounterFile> exception is thrown if the file is invalid .

_set_report_type_from_file

Extracts Report_ID from file and sets report_type for this counter_file

_get_rows_from_COUNTER_file

Returns array of rows from COUNTER file

_add_job_message

Add a message to be displayed in the background job

_get_usage_object_id_hash

Return a usage_object id hash to be used when adding new yus/mus

_search_for_usage_object

Returns usage object if found

_is_same_usage_object

Returns true if is the same usage object

_get_month_number

Returns month number for a given Mmm month

_add_counter_log_entry

Adds a erm_counter_logs database entry

_add_usage_object_entry

Adds a usage object database entry

_type

<<