Download the PHP package jstewmc/path without Composer

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

Path

A class for dealing with string paths in PHP.

A path is a route through a hierarchy, for example, a folder in a file system or a category in a department tree.

Feel free to check out the API documentation, report an issue, contribute, or ask a question.

Segments

A path is composed of segments. Each segment represents a step in the path. For example, the path foo/bar/baz has three segments: foo, bar, and baz.

Segments are indexed starting with 0. So, in the path foo/bar/baz, the index of foo is 0. The index of bar is 1, and the index of baz is 2.

Most methods that use a segment's index as an argument will accept an offset. An offset can be positive (that many places from the beginning of the path) or negative (that many places from the end of the path). For example, an offset of 1 is the second segment in the path, and an offset of -1 is the last segment in the path. In addition, most methods accept the special strings first and last.

You can append, prepend, insert, set, and unset a path's segments:

The example above uses separate method calls. However, you can chain most of the methods:

Whenever a Path is used as a string, it will, no surprise, return the path as a string:

You can get, find, and verify a segment by it's value or offset:

Path

You can also slice and reverse a path.

You can slice and reverse the current path:

Or, you can slice and reverse a clone:

Tests

Tests cover more than 90% of the code. I'm not exactly sure what's missing, because I'm pretty sure I wrote tests for everything. If you see something missing, let me know.

Contributing

Feel free to contribute your own improvements:

  1. Fork
  2. Clone
  3. PHPUnit
  4. Branch
  5. PHPUnit
  6. Code
  7. PHPUnit
  8. Commit
  9. Push
  10. Pull request
  11. Relax and eat a Paleo muffin

See CONTRIBUTING.md for details.

Author

Jack Clayton - [email protected].

License

Url is released under the MIT License. See the LICENSE file for details.

History

You can view the (short) history of the Url project in the CHANGELOG.md file.


All versions of path 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 jstewmc/path contains the following files

Loading the files please wait ....