Download the PHP package secit-pl/schema-org without Composer
On this page you can find all versions of the php package secit-pl/schema-org. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download secit-pl/schema-org
More information about secit-pl/schema-org
Files in secit-pl/schema-org
Package schema-org
Short Description Schema.org classes.
License MIT
Homepage http://secit.pl
Informations about the package schema-org
Schema.org class mapping
A class mapping for the schema.org data types, types and properties.
BC break warning
From release 3.3.2 all properties should be suffixed by the word Property and all types should be suffixed by the word Type. All properties without Property suffix and and all types without Type suffix are now marked as deprecated. This change is required to support PHP 7.x which have a few new restricted words which cannot be used as a class names.
Please change your code and add the suffix to use the new naming schema.
All deprecated (non suffixed) classes will be removed in release 3.4.
Installation
From the command line run
Usage
First create the data structure:
Now you can convert it to the JSON-LD string as following
The output should be a valid schema.org JSON-LD:
If you'd like to check the output validation you can use the tool provided by Google: https://search.google.com/structured-data/testing-tool
Code examples
Breadcrumbs
The output:
Product
The output:
Project tags
As you maybe noticed the bundle don't use the standard tag numeration flow. Each two first parts of the tag corresponds to the version of the schema from schema.org from which the mapping classed were generated.
The schema.org releases history can be found here: https://schema.org/docs/releases.html
Want to support this bundle?
Consider using our random code generator service at codito.io.
With codito.io you can generate up to 250,000 codes in the format of your choice for free. You can use the generated codes for purposes such as promotional codes (which you can, for example, print on the inside of packaging), serial numbers, one-time or multi-use passwords, lottery coupons, discount codes, vouchers, random strings and much more - for more use cases see our examples. If 250,000 codes are not enough for you, you can use our commercial code generation service.