2017 © Pedro Peláez
 

library silex-service-provider

Sanity service provider for Silex

image

sanity/silex-service-provider

Sanity service provider for Silex

  • Monday, November 20, 2017
  • by sanity
  • Repository
  • 7 Watchers
  • 1 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 5 % Grown

The README.md

Sanity service provider for Silex

A service provider for Silex that can be used to communicate with the Sanity API using the PHP library., (*1)

PackagistTravis, (*2)

Requirements

The service provider can be used with Silex >= 2.0., (*3)

Installation

You can install the library via Composer. Run the following command:, (*4)

composer require sanity/silex-service-provider

To load the service provider simply register it in the Silex application:, (*5)

<?php
$app = new Silex\Application();
$app->register(new Sanity\Silex\ServiceProvider(), [
    'sanity.client.options' => [
        'projectId' => '<project id>', // required
        'dataset' => '<dataset>',      // required
        'useCdn' => true,
    ],
]);

Usage

The service provider exposes the API client through a service called sanity.client that can be fetched from the application instance:, (*6)

$apiClient = $app['sanity.client'];

Learn more about how to use the PHP library for the Sanity API., (*7)

Contributing

sanity/silex-service-provider follows the PSR-2 Coding Style Guide. Contributions are welcome, but must conform to this standard., (*8)

License

MIT-licensed, see LICENSE., (*9)

The Versions

20/11 2017

dev-master

9999999-dev

Sanity service provider for Silex

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sanity.io

20/11 2017

v1.0.1

1.0.1.0

Sanity service provider for Silex

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sanity.io

14/11 2017

v1.0.0

1.0.0.0

Sanity service provider for Silex

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sanity.io