Skip to content

Commit 88c6027

Browse files
committed
Merge branch 'release/0.6.0'
2 parents 26e625f + 40f3d28 commit 88c6027

File tree

82 files changed

+3018
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+3018
-62
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
### [0.6.0] - 2016-10-02
3+
4+
* added basic meta model
5+
26
### [0.5.3] - 2016-10-02
37

48
* fixed subscription monitor integration test

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
"codacy/coverage": "dev-master"
2424
},
2525
"autoload": {
26-
"psr-0": {
27-
"Tidal\\WampWatch": "src/"
26+
"psr-4": {
27+
"Tidal\\WampWatch\\Test\\Unit\\": "tests/unit",
28+
"Tidal\\WampWatch\\Test\\Integration\\": "tests/integration",
29+
"Tidal\\WampWatch\\": "src/Tidal/WampWatch"
2830
}
2931
},
3032
"scripts": {

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Tidal/WampWatch package.
5+
* (c) 2016 Timo Michna <timomichna/yahoo.de>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*
10+
*/
11+
12+
namespace Tidal\WampWatch\Behavior\Event;
13+
14+
trait ObservableTrait
15+
{
16+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Tidal/WampWatch package.
5+
* (c) 2016 Timo Michna <timomichna/yahoo.de>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*
10+
*/
11+
12+
namespace Tidal\WampWatch\Contract\Async;
13+
14+
interface PromiseInterface
15+
{
16+
/**
17+
* @return PromiseInterface
18+
*/
19+
public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null);
20+
21+
public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null);
22+
23+
/**
24+
* @return PromiseInterface
25+
*/
26+
public function otherwise(callable $onRejected);
27+
28+
/**
29+
* @return PromiseInterface
30+
*/
31+
public function always(callable $onFulfilledOrRejected);
32+
33+
/**
34+
* @return PromiseInterface
35+
*/
36+
public function progress(callable $onProgress);
37+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Tidal/WampWatch package.
5+
* (c) 2016 Timo Michna <timomichna/yahoo.de>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*
10+
*/
11+
12+
namespace Tidal\WampWatch\Contract\Event;
13+
14+
interface EventEmitterInterface
15+
{
16+
/**
17+
* Registers a subscriber to be notified on given event.
18+
*
19+
* @param string $eventName the event to subscribe to
20+
* @param callable $callback the callback to notify the subscriber
21+
*
22+
* @return mixed
23+
*/
24+
public function on($eventName, callable $callback);
25+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Tidal/WampWatch package.
5+
* (c) 2016 Timo Michna <timomichna/yahoo.de>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*
10+
*/
11+
12+
namespace Tidal\WampWatch\Model\Behavior\Property;
13+
14+
use InvalidArgumentException;
15+
use Tidal\WampWatch\Model\Contract\Property\CollectionInterface;
16+
17+
trait HasCollectionsTrait
18+
{
19+
private function initCollection($name, CollectionInterface $collection)
20+
{
21+
if (property_exists($this, $name)) {
22+
$this->{$name} = $collection;
23+
}
24+
}
25+
26+
private function appendTo($name, $value)
27+
{
28+
$this->getCollection($name)->append($value);
29+
}
30+
31+
/**
32+
* @param string $name the name of the collection
33+
*
34+
* @throws InvalidArgumentException when the collection has not been initialized before
35+
*
36+
* @return CollectionInterface the collection object
37+
*/
38+
private function getCollection($name)
39+
{
40+
if (!$this->hasCollection($name)) {
41+
throw new InvalidArgumentException("No Collection with name '$name' registered.");
42+
}
43+
44+
return $this->{$name};
45+
}
46+
47+
private function hasCollection($name)
48+
{
49+
return property_exists($this, $name) && is_a($this->{$name}, CollectionInterface::class);
50+
}
51+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Tidal/WampWatch package.
5+
* (c) 2016 Timo Michna <timomichna/yahoo.de>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*
10+
*/
11+
12+
namespace Tidal\WampWatch\Model;
13+
14+
use Tidal\WampWatch\Model\Property\Object\HasRouterTrait;
15+
use Tidal\WampWatch\Model\Property\Object\HasRealmTrait;
16+
use Tidal\WampWatch\Model\Property\Object\HasSessionTrait;
17+
18+
class Connection implements Contract\ConnectionInterface
19+
{
20+
use HasRouterTrait;
21+
use HasRealmTrait;
22+
use HasSessionTrait;
23+
24+
public function __construct(Contract\RouterInterface $router, Contract\RealmInterface $realm, Contract\SessionInterface $session = null)
25+
{
26+
$this->setRouter($router);
27+
$this->setRealm($realm);
28+
if ($session !== null) {
29+
$this->confirm($session);
30+
}
31+
}
32+
33+
public function confirm(Contract\SessionInterface $session)
34+
{
35+
$this->setSession($session);
36+
}
37+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Tidal/WampWatch package.
5+
* (c) 2016 Timo Michna <timomichna/yahoo.de>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*
10+
*/
11+
12+
namespace Tidal\WampWatch\Model\Contract;
13+
14+
interface ConnectionInterface
15+
{
16+
/**
17+
* @return RouterInterface
18+
*/
19+
public function getRouter();
20+
21+
/**
22+
* @return RealmInterface
23+
*/
24+
public function getRealm();
25+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Tidal/WampWatch package.
5+
* (c) 2016 Timo Michna <timomichna/yahoo.de>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*
10+
*/
11+
12+
namespace Tidal\WampWatch\Model\Contract;
13+
14+
use Tidal\WampWatch\Model\Contract\Property\Scalar\HasUriInterface;
15+
16+
interface ProcedureInterface extends HasUriInterface
17+
{
18+
}

0 commit comments

Comments
 (0)