Download the PHP package popphp/pop-code without Composer

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

pop-code

Build Status Coverage Status

Join the chat at https://discord.gg/TZjgT74U7E

Overview

pop-code provides the ability to dynamically generate PHP code on the fly as well as parse and modify existing PHP code.

pop-code is a component of the Pop PHP Framework.

Top

Install

Install pop-code using Composer.

composer require popphp/pop-code

Or, require it in your composer.json file

"require": {
    "popphp/pop-view" : "^5.0.3"
}

Top

Quickstart

Create a simple function

In this example, a function is created and rendered to a string:

Create a simple class

In this example, a class is created and saved to a file:

The contents of the file will be:

Top

Generate Code

There are a number of individual code generators available to manage the creation and output of various types of code blocks. Code generators are available for the following type of code:

Create a file with some functions

The above code will produce a file called functions.php with the following code in it:

Top

Parse Code

This pop-code component also provides the ability to parse existing code, which is useful to obtain information about the code or to even modify and save new code.

In this example, we use the class that we created above. The reflection object provides you with a code generator object like the one above so that you can add or remove things from the parsed code.

And the modified class will look like, complete with the new hasFoo() method:

Top


All versions of pop-code with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2.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 popphp/pop-code contains the following files

Loading the files please wait ....