Download the PHP package yii2mod/yii2-helpers without Composer
On this page you can find all versions of the php package yii2mod/yii2-helpers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yii2mod/yii2-helpers
More information about yii2mod/yii2-helpers
Files in yii2mod/yii2-helpers
Package yii2-helpers
Short Description Collection of useful helper functions for Yii Framework 2.0
License MIT
Informations about the package yii2-helpers
Yii2 Helpers
This extension is a collection of useful helper functions for Yii Framework 2.0.
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Available Methods
- add()
- average()
- collapse()
- except()
- has()
- first()
- flatten()
- last()
- only()
- pluck()
- prepend()
- pull()
- set()
- sort()
- sortRecursive()
- where()
- xmlStrToArray()
Method Listing
Add a given key / value pair to the array if the given key doesn't already exist in the array:
Get the average value of a given key:
You may also pass a key to the average method:
Collapse an array of arrays into a single array:
Get all of the given array except for a specified array of items:
Check if an item exists in an array using "dot" notation:
Return the first element in an array passing a given truth test:
Flatten a multi-dimensional array into a single level:
Return the last element in an array passing a given truth test:
Get a subset of the items from the given array:
Push an item onto the beginning of an array:
The function retrieves all of the collection values for a given key:
You may also specify how you wish the resulting collection to be keyed:
Get a value from the array, and remove it:
Set an array item to a given value using "dot" notation:
Sort the array using the given callback:
Recursively sort an array by keys and values:
Filter the array using the given Closure.:
Convert xml string to array.
StringHelper
-
- remove stop words from string
-
- Remove punctuation symbols from string