Getting started with the SDK for PHP

Cliente Php

The SDK for PHP provides a rich set of server-side functionality for accessing S&P’s server-side API calls.

Install

For proper operation we include the file sp-connector.php to load the functionalities.

 <?php require_once('sp-conector.php'); ?>

And create a new connection.

 <?php $sp = new sp_connector(); ?>

The required calls to load the content provided by S&P.

<div class="wrapper">
<?php echo $sp->showHeader(); # mostrara la cabecera ?>

<?php echo $sp->showSlider(); # mostrara el slider ?>

<?php echo $sp->showFooter(); # mostrara el footer ?>
</div>
Params

accountID
(string) (necesario) The user ID provided by S&P

isoLanguage
(string) Language in ISO 639-1.

isoCountry
(string) The country in ISO 639-1 to load a separate content for a country.

menuItems
(array) title: Title link. url Link relative to baseURL.


$sp = new sp_connector();
$sp->accountID = 'easyvent';
$sp->isoLanguage = $lang;
$sp->isoCountry = $country;
$sp->menuItems = array(
array('title' => 'Inicio', url => ''),
array('title' => 'Catálogo', url => '/catalogue'),
array('title' => 'Seletores', url => '/selector'),
array('title' => 'Projeto', url => '/project'),
array('title' => 'Contato', url => '/contact'),
);