Download the PHP package ntentan/utils without Composer

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

ntentan/utils

Tests Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads

A collection of utility classes shared across the different ntentan packages. ntentan/utils currently provides:

Installation

You can install this package through ntentan\utils on composer.

Text Manipulation

Text manipulation routines in the utils package provides inflector (for pluralizing or singularizing text), and camel case conversion routines. These routines are mainly consumed by components that generate magic strings for class and method names. All routines are implemented as static functions in the in the ntentan\utils\Text.

Inflector routines

The following snipet shows how the inflector routines in the Text class work.

``

Camel case manipulation

The following snipet shows how the camel case manipulation routines in the Text class work.

``

It is worth noting that the camel case manipuation routines allow you to specify your own seperator as a second argument. For example:

``

Filesystem

The utils package provides file manipulation utilities that wrap around PHP's built in filesystem functions to provide an object oriented interface. Through this package, you can perform the following:

While providing these features, the filesystem utilities rely on exceptions to inform about filesystem errors whenever they take place. The routines for the filesystem utilites can largely be accessed through a static facade, ntentan\utils\Filesystem, which provides an interface through which most of the features of the filesystem package can be accessed.

Working with directories

To create a directory ...

``

To create the entire hierarchy if it doesn't exist ... ``

Similarly, deleting directories can be done by ... ``
Note that this also deletes all the contents of the directory including subdirectories, which are recursively emptied.

Moving and copying files and directories

Continuing in a consistent fashion, copying directories work through ...

``
and with copying ...

``

If you care to use files instead, you can replace the call to Filesystem::directory with a call to Filesystem::file and perform your operations as follows ...

``

Checking file statuses and Dealing with errors

Errors that occur during filesystem operations are reported through exceptions. Exceptions are descriptively named such that a ntentan\utils\exceptions\FileNotFoundException is thrown when a file is not found, a ntentan\utils\exceptions\FileNotReadableException is thrown when trying to read a file that has no read permisions, and so on.

Permissions and statuses of files can be explicitly checked too, through methods in the static Filesystem class. These aptly named methods such as Filesystem::checkWriteable and Filesystem::checkExists, perform the correspondingly named checks and throw the appropriate exceptions when these checks fail.

Validation

You can validate the contents of arrays using the validation routines in the utils package. All validation is done through the Validator class. For example, to check if some required fields are set in an array you can use:

` Array ( [name] => Array ( [0] => The name field is required )

)



License
=======
Copyright (c) 2008-2020 James Ekow Abaka Ainooson

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

All versions of utils with dependencies

PHP Build Version
Package Version
No informations.
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 ntentan/utils contains the following files

Loading the files please wait ....