Download the PHP package pontedilana/open-graph-bundle without Composer

On this page you can find all versions of the php package pontedilana/open-graph-bundle. 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 open-graph-bundle

PHP Version Latest Stable Version Total Downloads Total Downloads License

OpenGraphBundle

The PontedilanaOpenGraphBundle is a simple way to improve how you manage OpenGraph into your Symfony application, through the use of the euskadi31/opengraph library.

This repository is a fork of tenolo/open-graph-bundle maintained by Pontedilana; support for PHP 8, Symfony 5 and 6 as been added.

Note: OpenGraph is a standard protocol used by many websites (Facebook, Twitter, Google, ...) to obtain more precise information about your content.

Learn more about OpenGraph

The idea of this bundle it to associate each entity of your app with an OpenGraph map, a service able to create the OpenGraph document for your entity.

It also works with any other type of data.

Installation

Installation is very quick:

1. Download it with Composer

Add the bundle to your composer.json file by running:

composer require pontedilana/open-graph-bundle

2. Enable it in your kernel

Enable the bundle in your app/AppKernel.php file;

Usage

The PontedilanaOpenGraphBundle will associate:

Let's take an example for a better understanding: a blog post.

Your entity

For a blog post, you could have an entity like this one:

Its OpenGraph map

The map associated with your entity will be a class implementing Pontedilana\OpenGraphBundle\Map\OpenGraphMapInterface and the two required methods of this interface : map(DocumentWriterInterface $document, $data) and supports($data).

For instance, our map could look like this :

The supports method declares with what kind of entities this map is able to deal. The map method create an OpenGraph document representing the given entity.

Once created, we still have to register our class into the OpenGraph manager. To do so, we will have to use the tag pontedilana_open_graph.map:

Using the map

Our map is registered, so we can use it anywhere we want to render it. For instance, with Twig:

Note: if no map is able to deal with the entity given in opengraph_render, an NotSupported exception will be thrown.

Another Note: Credits and inspiration goes to tgalopin


All versions of open-graph-bundle with dependencies

PHP Build Version
Package Version
Requires php Version 7.4.* || 8.1.* || 8.2.*
euskadi31/opengraph Version ^1.0 || ^2.0
symfony/config Version ^5.4 || ^6.2
symfony/dependency-injection Version ^5.4 || ^6.2
symfony/framework-bundle Version ^5.4 || ^6.2
symfony/http-kernel Version ^5.4 || ^6.2
symfony/twig-bundle Version ^5.4 || ^6.2
twig/twig Version ^3.5
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 pontedilana/open-graph-bundle contains the following files

Loading the files please wait ....