Download the PHP package arslanimamutdinov/iso-standard-utilities without Composer
On this page you can find all versions of the php package arslanimamutdinov/iso-standard-utilities. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package iso-standard-utilities
ISO standard utilities
This component provides features for supporting search iso standards raw data by attributes.
Installation
Terms and designations
- alpha2 - two-letter codes (recommended as the general-purpose code);
- alpha3 - three-letter codes;
- numericCodes - numeric codes;
- name - string name.
Component parts description
AttributeCode - class, containing iso attributes constants. Details:
- AttributeCodes::ATTRIBUTE_ALPHA2 - represents two-letter code attribute;
- AttributeCodes::ATTRIBUTE_ALPHA3 - represents three-letter code attribute;
- AttributeCodes::ATTRIBUTE_NAME - represents string name format attribute;
- AttributeCodes::ATTRIBUTE_NUMERIC_CODE - represents three-digit numeric code (which can be useful if you need to avoid using Latin script).
StandardSearchUtility - class provides set of function for working with raw data standards.
StandardSearchUtilityService - service class wrapper over StandardSearchUtility.
getByAlpha2
Input:
- $standardsData - array standards raw dataset;
- $alpha2 - two-letter code value;
Return: found standard raw array data, suitable to input two-letter code value (or null if not found).
Examples
getByAlpha3
Input:
- $standardsData - array standards raw dataset;
- $alpha3 - three-letter code value;
Return: found standard raw array data, suitable to input three-letter code value (or null if not found).
Examples
getByNumericCode
Input:
- $standardsData - array standards raw dataset;
- $numericCode - numeric code value;
Return: found standard raw array data, suitable to input numeric code value (or null if not found).
getStandardsDataByAttributeCode
Input:
- $standardsData - array standards raw dataset;
- $attributeCode - code attribute name;
- $value - code value
Return: found standard raw array data, suitable to input code attribute name and code value (or null if not found).
existByAlpha2
Input:
- $standardsData - array standards raw dataset;
- $alpha2 - two-letter code value;
Return: true if standard raw data exist by two-letter code, false if not exist.
existByAlpha3
Input:
- $standardsData - array standards raw dataset;
- $alpha3 - three-letter code value;
Return: true if standard raw data exist by three-letter code, false if not exist.
existByNumericCode
Input:
- $standardsData - array standards raw dataset;
- $numericCode - numeric code value;
Return: true if standard raw data exist by numeric code, false if not exist.
existByAttributeCode
Input:
- $standardsData - array standards raw dataset;
- $attributeCode - code attribute name;
- $value - code value
Return: true if found standard raw array data exist, false if not exist.
getAllNames
Input:
- $standardsData - array standards raw dataset;
Return: standards names string[].
getAllNumericCodes
Input:
- $standardsData - array standards raw dataset;
Return: standards numeric codes string[].
getAllAlpha3
Input:
- $standardsData - array standards raw dataset;
Return: standards Alpha3 codes string[].
getAllAlpha2
Input:
- $standardsData - array standards raw dataset;
Return: standards Alpha2 codes string[].
getAllAttributesByCode
Input:
- $standardsData - array standards raw dataset;
- $attributeCode - code attribute name;
Return: standards attribute code value searched by attribute code name.
getAllByAttributeCodeValues
Input:
- $standardsData - array standards raw dataset;
- $attributeCode - code attribute name;
- $values - code values string array;
Return: array of standards, filtered by given code attribute name and code values string array.
Examples
getAllByAlpha2Values
Input:
- $standardsData - array standards raw dataset;
- $values - alpha2 code values string array;
Return: array of standards, filtered by given alpha2 code values string array.
Examples
getAllByAlpha3Values
Input:
- $standardsData - array standards raw dataset;
- $values - alpha3 code values string array;
Return: array of standards, filtered by given alpha3 code values string array.
Examples
getAllByNumericCodeValues
Input:
- $standardsData - array standards raw dataset;
- $values - numeric code values string array;
Return: array of standards, filtered by given numeric code values string array.
Examples
getAllByNameValues
Input:
- $standardsData - array standards raw dataset;
- $values - name values string array;
Return: array of standards, filtered by given name values string array.
Examples
Contributing
Welcome to pull requests. If there is a major changes, first please open an issue for discussion.
Please make sure to update tests as appropriate.
Code coverage information
Coverage information locates on top of README file.