Download the PHP package mbs-dev/php-helpers without Composer

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

PHP Helper Functions

This package provides a collection of utility functions designed to streamline common tasks in PHP projects. It includes a variety of helpers for file handling, string manipulation, distance calculation, and more.

Installation

You can install this package via Composer:

Usage

Import Helpers:

Available Functions:


Function Details:

Gets the mime type of a file.

Parameters:

UploadedFile $picture: The uploaded file object. Returns: string - The mime type of the file.

Example:

Extracts an ID from a given API URL.

Parameters:

string $url: The URL from which to extract the ID. Returns: ?int - The extracted ID or null if not found.

Example:

Converts a string into a URL-friendly slug.

Parameters:

string $text: The text to slugify. Returns: string - The slugified text.

Example:

Creates an UploadedFile instance from a given path.

Parameters:

string $path: The path to the original file. string $copiedImagePath: The path where the copied image will be stored.

Example: Returns: UploadedFile - The created UploadedFile instance.

Example: Returns: string - The generated random string.

$randomString = Helpers::generateRandomString(); echo $randomString; // Outputs a random string

Parameters:

int $longueur: The length of the code. Returns: string - The generated code.

Example:

Calculates the distance between two geographic points.

Parameters:

float $lat1: Latitude of the first point. float $lon1: Longitude of the first point. float $lat2: Latitude of the second point. float $lon2: Longitude of the second point. string $unit: The unit of distance ('mile', 'foot', 'yard', 'km', 'm'). Returns: float - The distance between the points in the specified unit.

Example:

Extracts form data from a request.

Parameters:

\Symfony\Component\HttpFoundation\Request $request: The request object. Returns: array - The extracted form data.

Example:

Parses multipart form data from a request.

Parameters:

\Symfony\Component\HttpFoundation\Request $request: The request object. Returns: array - The parsed form data.

Example:

License

This package is open-sourced software licensed under the MIT license.

This README provides a comprehensive guide to using your helper functions in a PHP project. Adjust the "Installation" section as needed based on your package's specific details. ​:citation[oaicite:0]{index=0}​


All versions of php-helpers with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
symfony/http-foundation Version 6.4.*
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 mbs-dev/php-helpers contains the following files

Loading the files please wait ....