Download the PHP package abstract/core without Composer

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

Abstract Core For PHP

This package is the PHP implementation of Abstract. It parses Abstract source into the shared canonical tree, resolves safe data-driven commands, maps the tree for a target, and emits source or rendered output.

Start with the shared documentation if Abstract is new to you:

Index

Requirements And Installation

From this package checkout:

The package namespace is Abstract\ and Composer package name is abstracts/abstract.

Quick Start

This is the same walkthrough used in the TypeScript guide.

Output:

The parser creates canonical nodes. renderHtml() then resolves :logic:gte, :logic:var, and :if, maps the selected branch to HTML, and emits the string.

Source, Tree, Resolution, And Rendering

Use the operation that matches the job:

sourceJson() and sourceAml() do not evaluate conditions or loops. treeJson() does not convert back to tag-key source. See Source Emission And Rendering for the conceptual difference.

Parsing

AbstractCore exposes these parser methods:

Format String method File method Notes
JSON tag-key parseJson() parseJsonFile() reference native-data syntax
AML parseAml() parseAmlFile() Abstract command tags such as <:if> and <:logic:eq>
HTML parseHtml() parseHtmlFile() DOMDocument-backed markup parsing
XML parseXml() parseXmlFile() XML parsing with Abstract-aware command preprocessing
YAML parseYaml() parseYamlFile() normalizes through the native tag-key parser
TOML parseToml() parseTomlFile() object/table-oriented source
Pkl parsePkl() parsePklFile() PHP-only; trusted local modules through the pkl CLI

Normal keys become Elements. Primitive values become inferred Values. Internal commands begin with :. Use :type:* and :logic:* for new typed and logic source:

The complete grammar is maintained in the Source Commands, not duplicated here.

Markup Options

MarkupParseOptions controls mode-specific behavior such as fragments, whitespace, comments, doctypes, source metadata, strictness, runtime tags, nonstandard names, boolean attributes, and libxml flags.

Text-only markup remains text and does not gain an implicit paragraph.

Source Emission

Readable domain-qualified commands are the default:

Symbol operator output is optional:

Primitive JSON shorthand remains the default. Request explicit :type:* wrappers when source must carry declared types:

Canonical tree output is independent of source spelling:

It contains kind: "logic", canonical op: "eq", and args.

Rendering

Built-in output operations include:

Method Output
renderHtml() resolved HTML
renderXml() resolved XML with explicit closing tags
renderJsx() resolved JSX-like source through PHP's React mapper
renderYaml() resolved tree data as YAML
renderToml() resolved tree data as TOML
renderPkl() resolved tree data as Pkl
render($target, ...) any registered Render Target

TOML and Pkl output require object/map roots because their document models are property-oriented. YAML supports scalar, list, and map roots.

Strict And Loose Modes

Strict mode is the default.

Loose mode supports editing and diagnostics. It does not execute or register unknown commands.

Imports

:import and :include resolve relative to the importing source path, then cache parsed files by path, modification time, and content hash.

Import props extend the imported resolution context. Slot children append to the imported root Element or Fragment. Missing and circular imports are errors in strict mode.

The PHP core currently owns filesystem imports directly; there is no public PHP import-loader interface.

Custom Targets

Target customization is intentionally separate from source commands. A custom HTML mapping changes output without changing the canonical tree:

For complete custom mapper/emitter examples and closed extension boundaries, use Extending Abstract.

Examples And Development

Runnable examples are in examples/, including logic, imports, AML, XML, YAML, TOML, Pkl, mappings, and large HTML round trips.

Additional PHP references:

The root Source Commands are the canonical shared documentation.


All versions of core with dependencies

PHP Build Version
Package Version
Requires symfony/polyfill Version ^1.27
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 abstract/core contains the following files

Loading the files please wait ...