Download the PHP package cosmologist/gears without Composer

On this page you can find all versions of the php package cosmologist/gears. 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 gears

php-gears

Collection of useful functions

Installation

Array functions

Push element onto the end of array and returns the modified array
Prepend element to the beginning of an array and returns the modified array
Calculate the average of values in an array (array_avg)
Check if array is associative
Check if a value exists in an array
Get an item from the array by key
Convert list of items to ranges
Unset array item by value
List walker

Walks through the list and calls a callback for each item.

Recursive walker for list and descendants

Walks through the list and calls a callback for each item and for each child item (recursively).

Collect children recursively

Collects children recursively of each item in the list, as well as the item itself.

Cast to an array

Behavior for different types:

Verify that the contents of a variable is a countable value

If PHP >= 7.3.0 use is_countable function

Json functions

Decodes a JSON string, used exceptions instead errors.

Object functions

Reads the value at the end of the property path of the object graph

Uses Symfony PropertyAccessor

Sets the value at the end of the property path of the object graph

Uses Symfony PropertyAccessor

Reads the value of internal object property (protected and private)

Read ocramius

Writes the value to internal object property (protected and private)

Read ocramius

A string representation of the object

Returns the result of __toString or null if the method is not defined.
PHP default behavior: if the method is not defined, an error (Object of class X could not be converted to string) is triggered.

Cast an object or a FQCN to FQCN

Returns the result of __toString or null if the method is not defined.
PHP default behavior: if the method is not defined, an error (Object of class X could not be converted to string) is triggered.

String functions

Determine if a given string contains a given substring
Replace first string occurrence in an another string
Wrap string
Guess the type of string
Guess the suitable file-extension for string
Check if a string is a binary string
Convert string to CamelCase
Convert string to snake_case
ltrim()/rtrim()/trim() replacements supports UTF-8 chars in the charlist

Use these only if you are supplying the charlist optional arg and it contains UTF-8 characters. Otherwise trim will work normally on a UTF-8 string.

Number functions

Parse a float or integer value from the argument

Remove all characters except digits, +-.,eE from the argument and returns result as the float value or NULL if the parser fails.

Parse a float value from the argument

Remove all characters except digits, +-.,eE from the argument and returns result as the float value or NULL if the parser fails.

Parse a integer value from the argument

Remove all characters except digits, plus and minus sign and returns result as the integer value or NULL if the parser fails.

Returns fractions of the float value

Checks if the value is odd

Checks if the value is even

Round to nearest multiple
Round down to nearest multiple
Round up to nearest multiple
Spell out
Division with zero tolerance
Percent calculation

The first argument is a value for calculating the percentage. The second argument is a base value corresponding to 100%.

Unsign a number

A negative value will be converted to zero, positive or zero value will be returned unchanged.

Converts a number to string with sign.

Callable functions

Get a suitable reflection object for the callable


All versions of gears with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
symfony/property-access Version ^2.8||^3.0
myclabs/php-enum Version ^1.6
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 cosmologist/gears contains the following files

Loading the files please wait ....