Download the PHP package ccuffs/poll-from-text without Composer

On this page you can find all versions of the php package ccuffs/poll-from-text. 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 poll-from-text


Introduction

poll-from-text is a PHP package to parse semi-structured text into structured-data that can be used to build questionnaires (forms). The main goal is to allow end users to build dynamic forms, e.g. Google Forms, using plain text like they would if the forms were to be printed on paper.

NOTICE: this package assumes a certain format in the "pure" text, so it might not be as generic as possible. The world has bigger problems.

✨Features

🚀 Getting started

1. Add this package to your project

At the root of your project, run:

2. Basic usage

Instantiate the class CCUFFS\Text\PollFromText then call parse():

Tip: use CCUFFS\Text\PollFromText::make() if you don't want to instantiate an object.

The output should be something like:

A new line (without the option marks) indicates a new question:

The output should be something like:

You can create questions with options by prefixing lines with - or *:

The output should be something like:

3. Advanced usage

You can create questions with options and their values by using ), for instance:

The output should be something like:

Both questions and options accept a json string as a data field, e.g.

The output should be something like:

Data attribute for an options:

The output should be something like:

3.1 Specific configuration

Both parse() and make() accept a $config which is an array of configuration to consider when generating the questionnaire. Below is a complete list of all available configuration options:

4. Testing (related to the package development)

If you plan on changing how the package works, be sure to clone it first:

Install dependencies

Make your changes. After, run the tests it to ensure nothing breaked:

There should be plenty of green marks all over 😁

🤝 Contribute

Your help is most welcome regardless of form! Check out the code of conduct before making any interaction with other community members.

See the ROADMAP.md file for an idea of how the project should evolve.

🎫 License

This project is licensed under the MIT open-source license and is available for free.

🧬 Changelog

See all changes to this project in the CHANGELOG.md file.

🧪 Similar projects

Below is a list of interesting links and similar projects:


All versions of poll-from-text with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
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 ccuffs/poll-from-text contains the following files

Loading the files please wait ....