Skip to content
Snippets Groups Projects
Select Git revision
  • 4b741c6b9c6c1da489a975e78701a2fef4e13e58
  • 3.9 default
  • develop
  • 6.0
  • 5.0
  • 4.0
  • scrutinizer-patch-4
  • scrutinizer-patch-3
  • scrutinizer-patch-2
  • scrutinizer-patch-1
  • 3.7
  • 3.8
  • 3.6
  • 3.9_backported
  • 3.8_backported
  • 3.7_backported
  • 3.5
  • 3.6_backported
  • 3.5_backported
  • 3.4
  • 3.3_backported
  • 6.0.4
  • 6.0.3
  • 5.0.7
  • 6.0.2
  • 6.0.1
  • 5.0.6
  • 6.0.0
  • 5.0.5
  • 6.0.0-rc
  • 5.0.4
  • 6.0.0-beta
  • 5.0.3
  • 4.0.6
  • 5.0.2
  • 5.0.1
  • 4.0.5
  • 5.0.0
  • 4.0.4
  • 5.0.0-rc2
  • 5.0.0-rc1
41 results

WebservicesThirdpartyTest.php

Blame
  • index.php 1.43 KiB
    <?php
    
    $startTime = microtime(true);
    
    define('APPLICATION_DIR', '../application');
    define('MODULES_DIR', APPLICATION_DIR . '/modules');
    
    set_include_path(get_include_path() . PATH_SEPARATOR . '../library');
    require_once 'Zend/Loader.php';
    Zend_Loader::registerAutoload('Unl_Loader');
    
    $config = new Zend_Config_Ini(APPLICATION_DIR . '/config.ini');
    
    $pearPath = $config->pear->include_path;
    if ($pearPath) {
        set_include_path(get_include_path() . PATH_SEPARATOR . $pearPath);
    }
    
    Zend_Session::setOptions($config->session->toArray());
    
    $cache = Zend_Cache::factory(
        'Core',
        'Memcached',
        array('lifetime' => 60, 'automatic_serialization' => true),
        array('servers' => array('host' => 'localhost', 'port' => 11211))
    );
    Zend_Registry::set('cache', $cache);
    
    Zend_Session::start();
    
    $db = Zend_Db::factory($config->database);
    $db->query('SET NAMES utf8');
    Zend_Registry::set('db', $db);
    $db->getProfiler()->setEnabled(true);
    
    Zend_Layout::startMvc();
    $layout = Zend_Layout::getMvcInstance();
    $layout->setLayoutPath(MODULES_DIR . '/default/views/scripts');
    
    $front = Zend_Controller_Front::getInstance();
    $front->addModuleDirectory(MODULES_DIR);
    $front->setBaseUrl('/~tsteiner/CREQ3');
    $front->dispatch();
    
    /*
    echo '<!-- Query Count:  ' . $db->getProfiler()->getTotalNumQueries() . "\n";
    echo '     Query Time:   ' . $db->getProfiler()->getTotalElapsedSecs() . "\n";
    echo '     Request Time: ' . (microtime(true) - $startTime) . ' seconds -->';
    */