PHP Classes

File: demo/_config.php

Recommend this page to a friend!
  Classes of Oleksii Mylotskyi   PHP MoySklad Client   demo/_config.php   Download  
File: demo/_config.php
Role: Configuration script
Content type: text/plain
Description: Demo Config
Class: PHP MoySklad Client
Access the MoySklad API using ORM like objects
Author: By
Last change:
Date: 8 years ago
Size: 815 bytes
 

Contents

Class file image Download
<?php
namespace Zf2ClientMoysklad;

ini_set('display_errors', true);

chdir(__DIR__);

if (
file_exists(__DIR__ . '/../../../autoload.php')) {
   
$includePath = __DIR__ . '/../../../autoload.php';
} else {
   
$includePath = __DIR__ . '/../vendor/autoload.php';
}


if (!(@include_once
$includePath)) {
    throw new \
RuntimeException('Error: vendor/autoload.php could not be found. Did you run php composer.phar install?');
}

use
Zend\ServiceManager\Config;
use
Zend\ServiceManager\ServiceManager;

$module = new Module();

$sm = new ServiceManager(new Config($module->getServiceConfig()));

$sm->setService('config', array(
   
'zf2clientmoysklad' => array(
       
'api_url' => 'https://online.moysklad.ru',
       
'user_name' => 'admin@info_milsdev',
       
'password' => '65e23de84c'
   
)
));

global
$sm;