Download the PHP package beezee/phuph without Composer

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

phuph

phuph is a simple command line utility for PHP that reads Markdown files and interprets PHP code in phuph sheds, allowing you to write documentation that is evaluated as part of your build.

It is a direct (as possible) port of Rob Norris' sbt-tut for Scala.

It's just PHP that generates documentation for PHP by evaluating the PHP in said documentation, which was used to generate the documentation for that PHP. And a monad is a monoid in the category of endofunctors.

Installation And Use

composer g require beezee/phuph

Make sure that ~/.composer/vendor/bin is on your PATH.

This allows you to target specially formatted markdown files for document generation with the phuph command. If you have your markdown in the file README.phuph, you would run

phuph README.phuph > README.MD

to generate an evaluated version, with the output of your code blocks interleaved with their definitions.

Example

Given the following file README.phuph

phuph

function example($i) { return ['foo' => (1 $i), 'bar' => (2 $i)]; }

repl{ example(7); }

repl{ example(9); } phuph`

phuph README.phuph would output the following:

`

Which appears as below.


This is an example

Here is some regular markdown content

And here's the end


Basic Usage

phuph blocks

Code inside phuph blocks will be evaluated silently, and the code will be printed inside php syntax highlighted code blocks. For example:

phuph function print_and_return($i) { echo $i; return $i; }

print_and_return(3); phuph`

The above will not echo 3, but the code as written will print with php syntax highlighting, and the function print_and_return will be available for use in later repl expressions, as seen below.

Context from separate phuph blocks are shared, so functions and classes defined in earlier blocks will be available to later blocks.

repl expressions

Within a phuph block, repl expressions can be used to include the result of evaluating an expression immediately following it's definition. For example, given the function print_and_return defined by our prior phuph block above, the following:

phuph repl{ print_and_return(3); } phuph`

would be output as:

repl expressions must be single expressions, and must have a returnable value. This is due to the behavior of PHP's eval function. Contents within a repl expression must be used to form a return statement before being evaluated in order to capture the resulting value and include it in the output.

Modifiers

In addition to basic phuph blocks, two variations exist.

In addition to the repl expression, one variation exists.

Examples of all of the above can be found in the file that is used to generate this README

Contributing

If you are getting value out of phuph, that's awesome. I know that the Scala version has been a staple for me, and while feature parity is not something I paid much mind to, there\'s enough in here to allow me to use phuph to generate it\'s own documentation. which was a little hairier than I expected.

The coding style is heavily functional, with little ceremony. This means that fixes and feature additions are generally possible with minimal code changes, but finding the right code to change takes some careful thought. This is by design.

With that being said, pull requests and issues are welcome.


All versions of phuph with dependencies

PHP Build Version
Package Version
Requires widmogrod/php-functional Version ^5.1
functional-php/trampoline Version ^1.1.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 beezee/phuph contains the following files

Loading the files please wait ....