Download the PHP package brekitomasson/kew without Composer

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

BrekiTomasson/Kew

A simple little package to help you set up and handle Last In-First Out and Last In-Last Out scenarios.

Step The First:

~/your_projects/folder> composer require brekitomasson/kew

Step The Second:

Description & Syntax

Note: I use the term "list" in several places in this document. In most cases, this just means an instantiation of the Kew object. However, since Kew can be used both as a Queue and as a Stack, I'm using the more generic 'list' for both.

All in all, this is an extremely straight-forward package. Simply instantiate a new Kew (Yes, pronounced like "queue". I know, so very clever...) object into a variable, and you will have the following methods at your disposal:

Or, to visualize it a little differently:

Philosophy & Limitations

Options

Despite lists being a fairly straight-forward data type, there are a couple of things that you can change during construction of your list - only during construction. To set any of these values, pass an associative array during construction of the list containing one or more of these values:

Examples, AKA "Stacks and Queues"

Imagine the following two scenarios:

Example 1 - Queue

You're building an app to automate the processing and prettification of user's pictures before they post them to an online service. Unfortunately, despite the fast network speeds that allow people to upload hundreds of pictures in just a minute, the processing takes about a minute per picture. Instead of having to wait for all pictures to be done, you want to make them available to the user as processing finishes each picture.

Enter Kew! To get this to work, you could do something like this:

... or, more simply:

Example 2 - Stack

You're expanding the social aspects of your picture processing tool by allowing people to navigate pictures posted by other users. It's easy to navigate to a new user or new picture, of course, but you need some way for users to go back in their navigation history ...

Enter Kew! Every time a user starts a session, they're assigned a new Kew object, instantiated with the option ['stack' => true]. Whenever they click to another page in the app, the current page (the one that they are leaving, not the one that they are navigating to) is add():ed to the stack. Then, if they ever need to go back, all you need is to get() from the stack. If they want to continue backwards, just continue to get() from the stack until they are where they want to be.

TODO / Future development


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

Loading the files please wait ....