Download the PHP package php-kit/power-primitives without Composer

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

Power Primitives

PHP arrays and strings with the fluency of modern collection APIs

Why Power Primitives?

Plain PHP arrays and strings are wonderfully flexible, yet they quickly turn into walls of procedural helper calls. Loop counters, temporary variables and manual checks for missing keys clutter the happy path of your application.

The PowerArray and PowerString classes wrap native values in a lightweight object-oriented facade that embraces PHP 8 and makes common transformations readable, chainable and safe.

No temporary arrays, no custom utility library scattered throughout your project — just fluent, discoverable methods that compose naturally.

Installation

Requires PHP 8.1 or newer (tested up to 8.4-dev). The package ships with a self-contained test runner, so no external dependencies are required to verify your installation.

A tour of PowerArray

Create an instance with PowerArray::of() (copying data) or asPA() for a zero-cost wrapper around an existing array. From there you gain a toolbox of methods grouped into categories:

Construction & inspection

Transformation & chaining

Filtering & searching

Field level helpers

Serialization & compatibility

The entire API is designed for method chaining so you can describe your intent at a high level and only drop down to native arrays when you call all().

A tour of PowerString

PowerString takes the same philosophy to text processing. Wrap your string via PowerString::of() or the PS() helper and unlock a Unicode-aware toolkit:

Creation & mutation

Inspection & navigation

Interoperability

Convenience helpers

Short global functions live in src/globals.php:

They make quick scripting or prototyping a breeze:

Comparing to procedural PHP

Traditional helpers often look like this:

With Power Primitives the same intent reads like a story:

Each method describes what you want, not the low-level mechanics of how to obtain it. Tests in this repository guard every method, so you can chain with confidence.

Running the tests

The project ships with a deterministic, dependency-free test suite covering the full API surface.

The runner prints a friendly checklist so you immediately know the health of your installation. (CI environments can simply check for an exit code of 0.)

Contributing

Issues and pull requests are welcome! The codebase embraces strict types, PHP 8 features and thoughtful documentation. Please run php tests/run.php before submitting patches.

License

Power Primitives is open-source software licensed under the MIT license.


All versions of power-primitives with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
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 php-kit/power-primitives contains the following files

Loading the files please wait ...