Download the PHP package wikimedia/webidl without Composer

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

WebIDL

WebIDL is a parser for Web IDL, a language to specify web APIs in interoperable way. This library supports PHP, and is in the same spirit as (but shares no code with) webidl2 for JavaScript and the browser.

Report issues on Phabricator.

Install

This package is available on Packagist:

Usage

WebIDL provides one function, parse, which converts a WebIDL string into a syntax tree.

The parse() method optionally takes an option array with the following keys:

AST (Abstract Syntax Tree)

The AST output matches the webidl2 AST docs with PHP associative arrays replacing JavaScript objects in the usual way (ie, JSON output deserialized in PHP with json_decode($ast, true)).

Briefly, the WebIDL input:

Gives the following PHP array after parsing:

Refer to the webidl2 docs or the files in tests/syntax/ for more details.

Tests

Test cases in tests/invalid and tests/syntax come from webidl2.js. If you update them from upstream, please update the commit hash in tests/WebIDLTest.php as well.

Hacking

The grammar is written using wikipeg, a PEG parser generator that can output either JS or PHP code. To regenerate the parser after changes are made to Grammar.php, run:

License and Credits

The initial version of this code was written by C. Scott Ananian and is Copyright (c) 2021 Wikimedia Foundation.

This code is distributed under the MIT license; see LICENSE for more info.

Test cases used by this code were part of the webidl2.js package, which is Copyright (c) 2014 Robin Berjon and also distributed under the MIT license.


All versions of webidl with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
wikimedia/wikipeg Version ^2.0.6
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 wikimedia/webidl contains the following files

Loading the files please wait ....