Download the PHP package idealley/cloudcms-sdk without Composer

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

Cloud CMS SDK for PHP

Cloud CMS is a "headless" CMS.

This is a framework agnostic PHP SDK.

Here is the Laravel5 wrapper

What can it do

For now the SDK allows to read content from CloudCms as well as to write/update a node. We will be adding more features, but for now the SDK allows to create a full fonctional website using Cloud CMS as content management.

How to install

composer require idealley/cloudcms-sdk

Main available methods

You can get a children of a node like this (think category or list of blogs)

    $catnode = 'o:9a8195e6286a4f7b40ae';

    $nodes = CC::nodes()
            ->listChildren($catnode)
            ->addParams(['full' => 'true'])
            ->get(); 

Or a single node (for now we are getting it from a special slug field) like this:

    $node = CC::nodes()
                ->find($slug)
                ->addParams(['full' => 'true'])   
                ->get();

You can chain paramas

    $node = CC::nodes()
                ->find($slug)
                ->addParams(['full' => 'true']) 
                ->addParams(['metadata' => 'true'])   
                ->get();           

or pass them in a single array

                ->addParams(['full' => 'true', 'metadata' => 'true']) 

You can get an image like this

    $path = 'Samples/Catalog/Products/';            
    $img = CC::nodes()
                ->getImage($node['rows'][0]['_qname'])
                ->addParams(['name' => $node['rows'][0]['_features']['f:filename']['filename']])
                ->addParams(['size' => '400'])
                ->set();

You can chain any params as per the documentation

Refer to repository/Node.php to see all available methods. They are documented with working examples

Model (Schema)

In order to simplyfy the display of the content you can save the model (schema) from Cloud CMS locally. Then when you have a sucessfull request you can compare it to the model. All properties are available and you do not need to check if they are set.

This method will get the model and save it locally

    CC::setModel('your:content-type');

This method will delet the model (when you update it in Cloud CMS)

    CC::setModel('your:content-type');

Here is an example of parsing

        foreach ($items as $key => $i){
            // You can do it as the commented lign if you do use Cloud CMS array elements (repeatable elements in the interface)
            //$item += $this->model;
            //If not do it like this
            $item = array_replace_recursive($this->model, $i);
            [...]
            // you can then work on your fields for example to parse markdown
            // the $item has ben objectified before hand
            $item->body = Markdown::parse($item->body);
            //but you could do it like this if your prefer to work on an array
            $item['body'] = Markdown::parse($item['body']);

Todo

Get documents and images stored in Cloud CMS


All versions of cloudcms-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
guzzlehttp/guzzle Version >=6.0.0
league/oauth2-client Version >=1.3.0
league/flysystem Version ~1.0
symfony/yaml Version ^2.8|^3
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 idealley/cloudcms-sdk contains the following files

Loading the files please wait ....