Download the PHP package marsapp/maphelper without Composer
On this page you can find all versions of the php package marsapp/maphelper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download marsapp/maphelper
More information about marsapp/maphelper
Files in marsapp/maphelper
Package maphelper
Short Description Assist in processing the related actions of the mapping table.
License MIT
Homepage https://github.com/marshung24/MapHelper
Informations about the package maphelper
1. MapHelper
- Assist in processing the related actions of the mapping table.
- Provide unified data access functions to facilitate sharing throughout the program.
2. Outline
- 1. MapHelper
- 2. Outline
- 3. Installation
- 3.1. Composer Install
- 3.2. Include
- 4. Usage
- 4.1. Example
- 5. API Reference
- 5.1. init()
- 5.2. add()
- 5.3. addRaw()
- 5.4. sort()
- 5.5. getMap()
- 5.6. location()
- 5.7. hasMap()
- 5.8. mapList()
3. Installation
3.1. Composer Install
3.2. Include
Include composer autoloader before use.
4. Usage
4.1. Example
Namespace use:
5. API Reference
5.1. init()
Init map cache table.
Parameters
- array $mapName: Map name for initialize, if value is null, initialize all.
Return Values
- MapHelper
Example :
5.2. add()
Add data to map cache table. Need to specify the processing method.
Parameters
- array $data: Raw data, Want to save to map cache.
- string $mapName: Map name
- array $indexBy: Index list for grouping
- string $indexType: Type list: indexBy, groupBy, indexOnly
Return Values
- MapHelper
Example :
5.3. addRaw()
Add raw data to map cache table. Data will be directly stored in cache.
Parameters
- array $data: Raw data, Want to save to map cache.
- string $mapName: Map name
Return Values
- MapHelper
Example :
5.4. sort()
Sort map data. When doing location point, it is necessary to sort in advance.
Parameters
- string $mapName: Map name
- string $type: Sort type, Support 'ksort', 'krsort'
Return Values
- Returns the resulting array.
Example :
5.5. getMap()
Data re-index by keys
Parameters
- string $mapName: Map name
- array $indexBy: Index list for search
- bool $exception: default false
Throw Exception Return Values
- array|mixed
Example :
5.6. location()
Get data by location point. When doing location point, it is necessary to sort in advance.
Parameters
- string $mapName: Map name
- array $indexBy: array indexs before location point.
- string $location: Location point field name
Return Values
- mixed
Example :
5.7. hasMap()
Data re-index by keys
Parameters
- array $mapName: Map name.
Return Values
- boolean
Example :
5.8. mapList()
Data re-index by keys
Return Values
- array.
Example :