Download the PHP package xenokore/utility without Composer

On this page you can find all versions of the php package xenokore/utility. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package utility

Xeno Utility Library

A library filled with utility functions.

ArrayHelper


Set an array item to a given value using "dot" notation.
If the given key is null, the entire array will be replaced. Returns the new array.


Get an item from an array using "dot" notation.
If the $throw argument is set to true an ArrayKeyNotFoundException is thrown instead of returning the default value.


Determine whether a given value is array accessible.
Checks if the value is an instance of \ArrayAccess.


Determine if a given key exists in the provided array.


Creates a multidimensional array based on an array of dotnotation keys.
Useful for configuration arrays.

Example:

Turns into


Convert multidimensional array to 2D array with dotnotation keys.
https://stackoverflow.com/a/10424516/5865844
Useful for configuration arrays.

Example:

Turns into


Move an array item to the start of the array.


Move an array item to the end of the array.


Merge 2 arrays recursively and replaces distinct non-array values.


Get a checksum of the given array.


Gets a value from an array based on the current day. Each day the value shifts to the next one. Maximum array size is around 20 million. (Ymd as an int).


ClassHelper

Get the name of a constant based on value.
Can be given a prefix to narrow the search.


Get the info of a class by filepath.
Returns an array with the class name and the full namespace.
Does not use reflection and does not initiate the class.


Get the class name from a file containing a class.
The namespace is not included.


Get the namespace from a file containing a class.


Get the full class name from a file containing a class. The returned string contains the namespace and class name.


Get the raw code from a method of a class.


Call a private method of a class.
Useful for unit testing internal workings.


DirectoryHelper


All versions of utility with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xenokore/utility contains the following files

Loading the files please wait ....