Download the PHP package ama-team/pathetic without Composer

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

Pathetic

Packagist AppVeyor/Master CircleCI/Master Scrutinizer/Master Coveralls/Master

Pathetic is a simple PHP library consisting just of couple of classes. It is aimed to help with platform-independent path work, so you can run the same code, fnmatch checks and comparisons regardless of specific machine your project is running on.

And yes, it is influenced by java.nio.Path.

Installation

Usage

You start with classic string and Path::parse method:

Second argument should be used only when you operate with paths for specific platform - by default, it is calculated automatically.

After you've obtained path instance, you can simply convert it to string to get consistent-delimiter representation:

This will save you from awkward moments when you append directory/file to windows path and then try to compare it with path received from OS (which will contain directory\file instead), also, it makes it pretty easy to use fnmatch glob patterns platform-independently.

If you ever to need platform-consistent representation, you may use toPlatformString() method:

Except for those basic operations, Pathetic allows basic path normalization, path concatenation (resolution), path relativization and path comparison.

At last, there are some helper methods you may want to use:

Major notes

All path operations are non-destructive, and all path instances are immutable - whenever #normalize(), #relativize() or #withRoot() are called, new object is created instead of modifying old one.

There is edge case with current directory - while one may expect that normalized relative path of current directory will render down to dot ('.'), this won't happen - it will be rendered to empty string (''). However, while you don't call for normalization, your path will stay as-is.

Windows has two types of absolute paths - with and without drive letter, (\Users and C:\Users, for example). Both types are treated as absolute by Pathetic - it's up to end user to determine if he or she has to specify drive letter to not to inherit it from current working directory. This is, of course, a drawback, but unless that absolute path is inherited from user input - which should be intentional thing - that shouldn't happen.

Dev branch shield cellar

AppVeyor/Dev CircleCI/Dev Scrutinizer/Dev Coveralls/Dev


All versions of pathetic with dependencies

PHP Build Version
Package Version
Requires php Version >= 5.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 ama-team/pathetic contains the following files

Loading the files please wait ....