Download the PHP package omarwebdev/plass without Composer

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

Plass

Introducing Plass, the ultimate solution for converting PHP's built-in functions into class methods! With Plass, you can access PHP's functions in a more intuitive and readable way.

For example, the strtoupper function can now be called as Str::of('some string')->toUpperCase(). This not only makes your code more readable, but it also makes it easier to understand what each method does, without having to refer to the PHP manual.

Plass covers all wil cover all the common PHP functions, including string manipulation, array operations, and more. With its concise and consistent API, you can use familiar method names to perform the same operations as in PHP.

In addition, Plass includes a comprehensive test suite to ensure compatibility with the latest version of PHP and to ensure that your code will continue to work as expected.

Whether you're a beginner or an experienced developer, Plass will make your life easier by providing a better, more intuitive way to access PHP's functions. Try it today and see the difference for yourself!

Why use Plass?

Whether you're a beginner or an experienced developer, Plass will make your life easier by providing a better, more intuitive way to access PHP's functions. So why not try it today and see the difference for yourself?

Usage for strings:

Create a string

PHP normal way of creating a string is simple for example:

Well, when using Plass it is a little different because you have to create a new instance of Str class for example:

You can also use static method called of instead of using new keyword for example:

Method chaining

Yes, Plass supports method chaining for example:

Accessing the value of the string

In Plass it is possible to access the string without calling any methods using php type casting for example:

However, if you don't want to use php string type cast you can use toString method for example:

Accessing character at specific index

While plass is using class it is still possible to access character by index for exmaple:

Changing string

You can easily change the string by just creating a new instance, but what if you want to keep the old string and just edit a character? Plass provides a way to change a character in a string without creating a new instance for example:

Available Methods

Only methods that returns Str is chainable. Chainable methods means that you can chain methods for example: Str::of('someString')->toUpperCase()->trim()->shuffle()

charAt(int $index): string|null

This method returns the character in a specific index of the string or null if index is out of range.

Note: The original string is not modified.

toUpperCase(): Str

Convert string letters to upper case.

toLowerCase(): Str

Convert string letters to lower case.

repeat(int $count): string

repeat a string for the given number of times.

Note: The original string is not modified.

trim(): Str

Removes whitespace from the beginning and end of a string.

substr(int $start, ?int $length): string

Returns a part of string. Note: The original string is not modified.

substrReplace(array|string $replace, array|int $offset, array|int|null $length = null): Str

Replace a part of string by offset and length.

shuffle(): Str

Shuffles the string letters ex. abc => bca.

replace(array|string $search, array|string $replace): Str

Replaces a part of a string in the string with other string

contains(string $search): bool

Checks if a string contains a substring.

Contribution

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Installation:

Copy the repository and create a new branch.

Install dependencies:

Run tests

License

MIT


All versions of plass with dependencies

PHP Build Version
Package Version
Requires php Version >8.0
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 omarwebdev/plass contains the following files

Loading the files please wait ....