PHP code example of devmachine / guzzle-markus-client

1. Go to this page and download the library: Download devmachine/guzzle-markus-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

devmachine / guzzle-markus-client example snippets


use Devmachine\Guzzle\Markus\MarkusClient;

$client = MarkusClient::factory('http://forumcinemas.ee/xml');
$result = $client->areas();

var_dump($result['items']);

use Devmachine\Guzzle\Markus\MarkusClient;

$client = MarkusClient::factory('http://forumcinemas.ee/xml');

// Get list of locations.
$result = $client->areas();

// Get list of languages.
$result = $client->languages();

// Get list of show dates.
$result = $client->schedule([
    'area' => $areaId // Defaults to first area in the list.
]);

// Get list of article categories.
$result = $client->articleCategories([
    'area' => $areaId // Filter by area.
]);

// Get list of articles.
$result = $client->articles([
    'area'     => $areaId,    // Filter by area.
    'event'    => $eventId,   // When specified "category" parameter has no effect.
    'category' => $categoryId // Filter by category.
]);

// Get list of events.
$result = $client->events([
    'area'            => $areaId,  // Has no effect when "coming_soon" parameter is set to true.
    'id'              => $eventId, // When specified "area" and "coming_soon" parameters have no effect.
    '

array(4) {
  [0] =>
  array(2) {
    'id' =>
    string(4) "1002"
    'name' =>
    string(21) "Tallinn - kõik kinod"
  }
  [1] =>
  array(2) {
    'id' =>
    string(4) "1008"
    'name' =>
    string(15) "Coca-Cola Plaza"
  }
  [2] =>
  array(2) {
    'id' =>
    string(4) "1005"
    'name' =>
    string(19) "Tartu - Kino Ekraan"
  }
  [3] =>
  array(2) {
    'id' =>
    string(4) "1004"
    'name' =>
    string(18) "Narva - Kino Astri"
  }
}