markup/contentful-sdk-bridge
Composer 安装命令:
composer require markup/contentful-sdk-bridge
包简介
A small bridge library to convert resources from the official Contentful SDK into resources compatible with the markup/contentful library.
README 文档
README
A small bridge library to convert resources from the official Contentful SDK into resources compatible with the markup/contentful library.
Installation
The Markup contentful-sdk-bridge bundle can be installed via Composer by
requiring themarkup/contentful-sdk-bridge package in your project's composer.json:
{
"require": {
"markup/contentful-sdk-bridge": "0.1"
}
}
Usage
The package provides some simple adapters enabling resources emitted from the official Contentful SDK to be used as if they are resources emitted from Markup's Contentful library.
Examples:
use Markup\ContentfulSdkBridge\AdaptedAsset; use Markup\ContentfulSdkBridge\AdaptedContentType; use Markup\ContentfulSdkBridge\AdaptedEntry; $space = 'content_space'; $locale = 'en-US'; /** @var \Contentful\Delivery\Resource\Entry $sdkEntry */ $markupEntry = new AdaptedEntry( $sdkEntry, $locale, $space ); /** @var \Contentful\Delivery\Resource\Asset $sdkAsset */ $markupAsset = new AdaptedAsset( $sdkAsset, $locale ); /** @var \Contentful\Delivery\Resource\ContentType $sdkContentType */ $markupContentType = new AdaptedContentType($sdkContentType);
统计信息
- 总下载量: 1.58k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-04-16