boing6002 / helpers
Helper classes dependency for Laravel Enso
1.10.0
2019-01-13 08:03 UTC
Requires
- php: >=7.1.0
- dev-master
- 1.10.0
- 1.9.8
- 1.9.7
- 1.9.6
- 1.9.5
- 1.9.4
- 1.9.3
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.14
- 1.7.13
- 1.7.12
- 1.7.11
- 1.7.10
- 1.7.9
- 1.7.8
- 1.7.6
- 1.7.5
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.2
- 1.6.1
- 1.5.1
- 1.5.0
- 1.4.0
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-adminlte
This package is auto-updated.
Last update: 2024-10-25 08:09:59 UTC
README
Helper classes dependency for Laravel Enso.
Includes
Classes
- An abstract
Enum
class which can be used to build an enumeration out of an array or a config file and comes with a set of helper functions - An
Obj
class, with a constructor for building an object from an array, a Laravel model that can even have loaded relationships and more. It provides a suite of helper functions, such as:all()
,__toString()
,toJson()
,toArray()
,get($key)
,set($key, $value)
,has($key)
,keys()
,values()
- A
JsonParser
class that takes a JSON file as its constrctor's argument, and can parse and transform the file to:- object
- array
- JSON string
Exceptions
- A generic exception:
EnsoException
is available also with a Facade. This exception is extended by all the other Enso specific exceptions and it is not reported by the Laravel's Exception Handler - A
FileMissingException
, a child ofEnsoException
- A
JsonParseException
, a child ofEnsoException
- A
MorphableConfigException
, a child ofEnsoException
Traits
ActiveState
- addswhereActive()
andwhereDisabled()
scopes,isActive()
andisDisabled()
helpers, for models that have a booleanis_active
property
Usage
Be sure to check out the full documentation for this package available at docs.laravel-enso.com
Contributions
are welcome. Pull requests are great, but issues are good too.
License
This package is released under the MIT license.