Download the PHP package redbitcz/utils without Composer

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

Redbit Utils

Lightweight utilities for logging, IO, and Unix-like process signal

Installation

Install via Composer:

Requirements

Package requires PHP version 7.3 and above.

For handling Unix-like process signals requires the pcntl and posix PHP extensions. Without that support related method call will be siletly ignored.

Usage

Locker

The \Redbitcz\Utils\Lock\Locker class is simple implementation of lock/semaphor based of filelock. It's optimized for Linux architecture.

Locker support two modes:

Example non-blocking lock:

See Non-blocking Locker example.

Example blocking lock:

See Blocking Locker example.

Logger

The \Redbitcz\Utils\Log\Logger class is implementation of PSR-3 logger interface and it decorates each logger record with time and log severity name.

Example:

Logger requires Writer \Redbitcz\Utils\IO\IOutStream instance. Package contains few several types of Writer implementations which are different by the log target (console, general output, standard output, HTML output, or file).

Logger also support sectionalization for long-processing operations:

Example:

Sends to output:

Section is useful to provide logger to another service which is requested to process single entity.

See Logger example.

Progress

The \Redbitcz\Utils\Log\Progress class is simple generator of progress status to reporting progress of operations. In additive is added the time spent is each step and whole operation.

Example:

See Progress example.

ProcessTerminationLock

The \Redbitcz\Utils\Process\ProcessTerminationLock class is simple mechanism how to prevent (rspt. delay) unexpected exit of PHP process during operation processing. It's recommended to workers to prevent break during processing a job and similar usage in processes managed by a Process Control system (systemd, supervisor, etc.).

Example:

See ProcessTerminationLock example.

BitwiseVariator

Classes in \Redbitcz\Utils\Bitwise namespace provides filtered bit variations generator over Bitwise values.

That mean, when you have bits 1011, variator generates all bits variations.

Variation for bits 1011
0000
0001
0010
0011
1000
1001
1010
1011

Filters

BitwiseVariator class provide filter to select variations with(out) some bits only.

Variation for bits 1011 with bite 0010
0010
0011
1010
1011
Variation for bits 1011 without bite 0010
0000
0001
1000
1001

Be aware to use more than 8 variated bits, because it proceed huge of variants:

Table with count of variants for every variated bits

(source: Spreadseed Bitwise Variator counts)

License

The MIT License (MIT). Please see License File for more information.

Contact

Redbit s.r.o. - @redbitcz - [email protected]


All versions of utils with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.0
psr/log Version ^1.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 redbitcz/utils contains the following files

Loading the files please wait ....