~ballot/wordpress/openstack-objectstorage-bis

« back to all changes in this revision

Viewing changes to vendor/guzzlehttp/guzzle/src/Event/HasEmitterTrait.php

  • Committer: Jacek Nykis
  • Date: 2015-02-11 15:35:31 UTC
  • Revision ID: jacek.nykis@canonical.com-20150211153531-hmy6zi0ov2qfkl0b
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
namespace GuzzleHttp\Event;
 
4
 
 
5
/**
 
6
 * Trait that implements the methods of HasEmitterInterface
 
7
 */
 
8
trait HasEmitterTrait
 
9
{
 
10
    /** @var EmitterInterface */
 
11
    private $emitter;
 
12
 
 
13
    public function getEmitter()
 
14
    {
 
15
        if (!$this->emitter) {
 
16
            $this->emitter = new Emitter();
 
17
        }
 
18
 
 
19
        return $this->emitter;
 
20
    }
 
21
}