Download the PHP package totten/pogo without Composer

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

PHP On the Go (pogo)

Pogo allows you to write small PHP scripts which use PHP libraries (courtesy of composer/packagist)... but it doesn't require you setup a special-purpose folder, project, or repository. To use a dependency, simply add a small pragma into your script. For example:

This makes it easier to use PHP libraries for glue-scripts, throw-away scripts, quick experiments, etc.

Example

Let's pick a small task that requires a few libraries -- suppose we want to generate a pretty PDF from a source-code file (*.php, *.json, etc). We'll need a pretty-printer (scrivo/highlight.php) and a PDF generator (dompdf/dompdf).

Skimming the README for each library, one finds a few introductory snippets. I took these, added the #!require pragmas, and improvised a little on the $html variable. This becomes a small script, code2pdf.php:

To run this script in the CLI, just use:

Of course, this script expects some content as input (e.g. myfile.yml) and produces a PDF as output (e.g. myfile.pdf), so a more realistic command would be

That's it!

More examples

The Robo. Each example is an executable program.

Motivation

Most of my day-to-day work is in PHP, JS, and bash. From time-to-time, one needs a bit of glue-code for one-offs, and I find myself avoiding PHP for that task... because using a library in PHP still requires bits of administrativa. pogo is an experiment to reduce that administrativa. Just create a .php file and run it.

Documentation

Related


All versions of pogo with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.8
lesser-evil/shell-verbosity-is-evil Version ~1.0
symfony/console Version ~4.0
symfony/yaml Version ~4.0
civicrm/composer-downloads-plugin Version ~3.0
symfony/filesystem Version ~4.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 totten/pogo contains the following files

Loading the files please wait ....