PHP Classes

File: test/Helpers/DummyServerService.php

Recommend this page to a friend!
  Classes of Artur Graniszewski  >  ZEUS for PHP  >  test/Helpers/DummyServerService.php  >  Download  
File: test/Helpers/DummyServerService.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: ZEUS for PHP
Manage the execution of multiple parallel tasks
Author: By
Last change: Improved error reporting on Server Service startup failures
Date: 3 years ago
Size: 679 bytes
 

Contents

Class file image Download
<?php

namespace ZeusTest\Helpers;

use
Zeus\Kernel\ProcessManager\SchedulerEvent;
use
Zeus\ServerService\ServerServiceInterface;
use
Zeus\ServerService\Shared\AbstractServerService;

class
DummyServerService extends AbstractServerService implements ServerServiceInterface
{
    public function
start()
    {
        if (isset(
$this->config['hang']) && $this->config['hang']) {
            return;
        }

       
$event = new SchedulerEvent();
       
$this->logger->info("SERVICE STARTED");
       
$event->setName(SchedulerEvent::EVENT_SCHEDULER_STOP);
       
$this->getScheduler()->getEventManager()->triggerEvent($event);
    }

    public function
stop()
    {

    }
}


For more information send a message to info at phpclasses dot org.