コード例 #1
0
ファイル: Server.php プロジェクト: hinathan/edges-php
 public function __construct()
 {
     parent::__construct();
     $this->on('checkContinue', function ($request, $response) {
         $response->writeContinue();
     });
 }
コード例 #2
0
ファイル: Files.php プロジェクト: hinathan/edges-php
 public function __construct($chunkstream)
 {
     parent::__construct();
     $this->chunkstream = $chunkstream;
     $this->chunkstream->on('partBegin', array($this, 'partBegin'));
     $this->chunkstream->on('end', array($this, 'end'));
 }
コード例 #3
0
ファイル: Timer.php プロジェクト: hinathan/edges-php
 public function setTimeout($callback, $interval_ms)
 {
     $base = \Event\Emitter::getBase();
     $event = event_timer_new();
     $arg = array($callback, $event, $interval_ms);
     event_timer_set($event, array($this, 'ev_timer'), $arg);
     event_base_set($event, $base);
     event_add($event, $interval_ms * 1000);
 }
コード例 #4
0
ファイル: index.php プロジェクト: mariuslundgard/php-debug
 public function __construct()
 {
     parent::__construct($this);
 }
コード例 #5
0
ファイル: Runloop.php プロジェクト: hinathan/edges-php
 public function run()
 {
     $base = \Event\Emitter::getBase();
     return event_base_loop($base);
 }