Download the PHP package popphp/pop-utils without Composer

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

pop-utils

Build Status Coverage Status

Join the chat at https://popphp.slack.com Join the chat at https://discord.gg/TZjgT74U7E

Overview

pop-utils is a basic utilities component of the Pop PHP Framework. It comes with a number of utility and helper classes that can be useful when building applications with Pop.

Top

Install

Install pop-utils using Composer.

composer require popphp/pop-utils

Or, require it in your composer.json file

"require": {
    "popphp/pop-utils" : "^2.0.0"
}

Top

Array Object

The Pop\Utils\ArrayObject class implements a number of interfaces to allow it to behave like array, but with much more functionality built in. With it, you can access the array data within the object via standard array notation ($ary['item']) or via object notation ($ary->item).

You can iterate over the array object and it is countable. Also you can cast it to an native array using the toArray() method.

There are also additional serialize/unserialize methods that allow you to work with the array object as JSON-string or PHP-serialized string

Top

Collection

The collection object is a array-like object with a tremendous amount of array-like functionality built into it. This allows you to call any number of methods on the object to perform operations on the array and its data. It's available API includes:

Top

Callable Object

The Pop\Utils\CallableObject class helps to manage callable objects and their parameters. This includes functions, closures, classes and their methods (both static and instance.) This is useful for wiring up something that needs to be called or triggered by the application at a later time.

The parameters can be set anytime in the callable object's life cycle, from the time of instantiation via the constructor, via the set/add methods or at the time of calling the object. Parameters passed into the callable object can be callable themselves and will be invoked at the time the parent callable object is called.

Function Callable
Closure Callable

Here's an alternate way to call by passing the parameter in at the time of the call:

Static Method Callable
Instance Method Callable
Constructor Callable

Top

DateTime Object

The Pop\Utils\DateTime class extend the native DateTime class and adds some helper functions:

Top

File Helper

The Pop\Utils\File class get quickly parse and return information about a file, including the mime type for common file types

You can quickly get just the mime type of a file like this:

Top

String Helper

The Pop\Utils\Str class has a number of static methods to assist in manipulating and generating strings.

Slugs
Links
Random Strings
Convert Case

The convert case feature allows for the following case and string format types:

And can be utilized via a variety of dynamic static method calls:

Top

Array Helper

The Pop\Utils\Arr class has a number of static methods to assist in manipulating arrays:

Top

Helper Functions

There is a set of "helper" functions to assist with quick manipulation of data like strings, arrays, and dates. The functions themselves can be loaded manually by including the functions.php file in this repository, or they can be loaded using the Pop\Utils\Helper class functions:

The above is automatically executed in a Pop\Application object's bootstrap method, unless it is disabled by the config setting of 'helper_functions' => false.

The included functions are:


All versions of pop-utils with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1.0
popphp/popphp Version ^4.2.12
ext-json Version *
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 popphp/pop-utils contains the following files

Loading the files please wait ....