Download the PHP package hphio/util without Composer

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

util

Utility classes for doing various tasks.

Helpers

These are utility wrappers of system functions, which should be used to perform system operations because they can easily be mocked in tests.

ShellExec

Use this to run command line utilities. It is a wrapper for shell_exec(). It is a class so that it can be mocked in tests.

Running the example above will print test to stdout, and error test to stderr. You can retrieve the output of both streams by calling the getStdout() and getStderr() methods.

This is very useful in preventing output from going to the screen with command line utils that dump logging information to stderr.

Tempdir

Use this to get a temporary directory.

Tempfile

Use this to get a temporary file.

PDF

Ghostscript

This class is used to downgrade / convert files from a newer version of PDF version 1.4 so that FPDi, FPDF, and other libraries can use it. It uses Ghostscript to do the conversion.

Usage:

PDF\VersionParser

This class read a PDF file, and parses out the version of the PDF for that file. The method: getVersion() returns a string, like "1.4" or "1.7". Example usage:

It follows the specification for PDF files for the header described in ISO 32000-1:2008 for PDF v1.7. The latest standard (v2.0) is described in ISO 32000-2:2020.

This class was developed using the following information obtained from PDF (Portable Document Format) Family:

Self-identification of chronological versions of PDF: Identification of chronological versions of PDF can be given
in two places in a PDF file. All PDF files should have a version identified in the header with the 5 characters
%PDF– followed by a version number of the form 1.N, where N is a digit between 0 and 7 or a version number of 2.0.
For example, PDF 1.7 would be identified as %PDF–1.7. However, beginning with PDF 1.4, a conforming PDF writer may
use the Version entry in the document Catalog to override the version specified in the header. The location of the
Catalog within the file is indicated in the Root entry of the file trailer/footer. This override feature was
introduced to facilitate the incremental updating of a PDF by simply adding to the end of the file. As a result,
it is necessary to locate the Catalog within the file to get the correct version number. Unless the PDF is
"linearized," in which case the Catalog is up front, this will require reading the trailer and then using the
reference there to locate the Catalog, which will typically be compressed. This has practical implications because
format identification tools, including DROID, typically look for particular characters at the beginning of a file
(i.e., in the header), to permit identification with minimal effort. DROID can look for characters at the end of the
file, but is not able to follow an indirect reference or decompress file contents. When the version number is not
the same in the header and the Catalog, there is potential for format identification errors.

PeopleTime

Summary

This class accepts two unix timestamps, and returns the human-readable, relative time for the interval between the two.

Usage:

$startTime is optional. If you leave do not specify it, it will use "now".

IniUploadManager

Summary

This class reads the php.ini file, and returns information about allowed upload sizes.

Dependencies

Requires these classes, which are included in this package.

Usage:

Assuming the following ini values:

This code can used as follows:

ByteValueInterpreter

Summary

A series of classes for converting ini values (like '8M') into their actual integer values.

Usage

Add dependencies to the container.

It can interpret human readable shortcut values:

And will interpret raw integer values as well:


All versions of util with dependencies

PHP Build Version
Package Version
Requires league/container Version ^4.2
hphio/queryrunner Version ^1.0
ext-simplexml Version *
ext-dom 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 hphio/util contains the following files

Loading the files please wait ....