Download the PHP package phphleb/draft without Composer

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

Draft Instances

Class generator using templates ("drafts")

This way is different from the traditional DI (Dependency injection), since it does not injects dependencies programmatically at runtime, but in advance, by generating and changing classes according to settings. The created classes exist as files; their correctness can be checked, dependencies are "visible" for IDE, so as testing is possible.

Link to instructions (RU)

Draft Instances is an experimental technique, as well as some others in HLEB framework encompassing this library. Unsuitable for using recklessly. If desired, the library may be connected separately (generation is implemented in GeneratingTask class).

Installation

Deployment

Generation

Generating classes and updating the autoloader. Every time when the settings or template classes are changed, this command is to be started.

The only distinction between the generated classes and the usual ones created by a developer is that the former are editable only from the "draft" or settings.

Using settings from one template ("draft"), you can create a lot of similar classes for different tasks. Each "draft" is arbitrary in content, the principle of substituting settings into it is simple, and it is specified as follows.

1 Array with settings:

2 Schematic template class TestDraftClass.php (default setting values for substitution are neutral-random to support syntax highlighting in IDE) 3` After starting the generation, two working classes are obtained:

The substitution was performed according to markers ..., then the value on the left to the marker, before the gap char, was taken, and all this was substituted with the suitable value from the class configuration. Only this rule is to be taken into account, on creating your own classes-"drafts" and their settings.

By default, some examples illustrating generation capabilities were created in this library (services.php file and DraftInstances folder with "drafts").

Switch to testing

Allows you to reassign classes from another folder (with stubs) for the entire project.

After that, you can run tests.

Attention! Only for the development server. Then you need to switch back to default.

Updating the library


License: MIT PHP PHP PHP


All versions of draft with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.0
ext-readline Version *
phphleb/updater Version *
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 phphleb/draft contains the following files

Loading the files please wait ....