Download the PHP
package carc1n0gen/phrontmatter without Composer
On this page you can find all versions of the php package
carc1n0gen/phrontmatter. 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.
A PHP library for parsing documents with frontmatter.
By default, documents are parsed as markdown with YAML front matter. The front
matter begins and ends with "---" like Jekyll
Install
$ composer require carc1n0gen/phrontmatter
Example
The parsed document content can be accessed with $document->getContent().
You can provide false as the second parameter to $parser->parse if you wish
to leave the document content as is with no parsing. For example, if the document
content is in HTML format and does not need parsing.
Different Front Matter Formats
PhrontMatter allows you to write your front matter in any format you like, and comes with two built in
adapters for YAML, and JSON. So you could also write the front matter in JSON.
JSON Front Matter
Custom Parser Adapters
The Parser class cunstructor signature is:
You can supply the constructor with your own front matter parsing adapter in the case you want to use another format besides YAML or JSON, You could supply the consturctor with your own content
parsing adapter in the case you want to write the document content in a format other than markdown, and you can supply the constructor with custom begin/end separators for the front matter
section of your document.
When writing a custom parser adapter, one only needs to meet the \Carc1n0gen\PhrontMatter\ParserInterface interface.
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 carc1n0gen/phrontmatter contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.