Download the PHP package contentstack/utils without Composer

On this page you can find all versions of the php package contentstack/utils. 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 utils

Contentstack PHP Utils SDK:

Contentstack is a headless CMS with an API-first approach. It is a CMS that developers can use to build powerful cross-platform applications in their favorite languages. Build your application frontend, and Contentstack will take care of the rest. Read More.

This guide will help you get started with Contentstack PHP Utils SDK to build apps powered by Contentstack.

Prerequisites

SDK Installation and Setup

To set up the Utils SDK in your PHP project, install it via gem:

If you are using Contentstack PHP SDK, then “contentstack/utils” is already imported into your project.

Usage

Let’s learn how you can use Utils SDK to render embedded items.

Create Render Option:

To render embedded items on the front-end, use the renderOptions function, and define the UI elements you want to show in the front-end of your website, as shown in the example code below:

Basic Queries

Contentstack Utils SDK lets you interact with the Content Delivery APIs and retrieve embedded items from the RTE field of an entry.

Fetch Embedded Item(s) from a Single Entry:

Render HTML RTE Embedded object

To get an embedded item of a single entry, you need to provide the stack API key, environment name, delivery token, content type’s UID, and entry’s UID. Then, use the Contentstack::renderContent function as shown below:

If you want to render embedded items using the CustomOption function, you can refer to the code below:

Render Supercharged RTE contents

To get a single entry, you need to provide the stack API key, environment name, delivery token, content type and entry UID. Then, use Contentstack::jsonToHtml function as shown below:

If you want to render embedded items using the CustomOption function, you can refer to the code below:

Fetch Embedded Item(s) from Multiple Entries

Render HTML RTE Embedded object

To get embedded items from multiple entries, you need to provide the stack API key, environment name, delivery token, and content type’s UID.

Render Supercharged RTE contents

To get a single entry, you need to provide the stack API key, environment name, delivery token, content type UID. Then, use Contentstack::jsonToHtml function as shown below:

GQL

To Convert JSON RTE content to HTML from GQL API. Use GQL::jsonToHtml function as shown below:


All versions of utils with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
marc-mabe/php-enum Version ^4.7.0
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 contentstack/utils contains the following files

Loading the files please wait ....