Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #6 from zircote/master

added copyright/licensing to files and updated namespacing in examples.
  • Loading branch information...
commit 6c096d865d9c8d1e9327651e932e8d71585a09d3 2 parents 8b53d82 + 842f831
Alvaro Videla authored
6 .gitmodules
... ... @@ -1,6 +0,0 @@
1   -[submodule "vendor/symfony/Symfony/Component/ClassLoader"]
2   - path = vendor/symfony/Symfony/Component/ClassLoader
3   - url = git://github.com/symfony/ClassLoader.git
4   -[submodule "vendor/videlalvaro/php-amqplib"]
5   - path = vendor/videlalvaro/php-amqplib
6   - url = git://github.com/videlalvaro/php-amqplib.git
2  composer.json
@@ -17,4 +17,4 @@
17 17 "php": ">=5.3.3",
18 18 "videlalvaro/php-amqplib" : "master-dev"
19 19 }
20   -}
  20 +}
28 examples/parallel_processing/char_count_server.php
... ... @@ -1,4 +1,31 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29
3 30 require_once(dirname(dirname(__DIR__)) . '/config/config.php');
4 31
@@ -13,4 +40,3 @@
13 40 $server->setCallback($charCount);
14 41 $server->start();
15 42
16   -?>
29 examples/parallel_processing/parallel_rpc.php
... ... @@ -1,5 +1,31 @@
1 1 <?php
2   -
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
3 29 require_once(dirname(dirname(__DIR__)) . '/config/config.php');
4 30
5 31 $start = time();
@@ -15,4 +41,3 @@
15 41
16 42 echo "Total time: ", time() - $start, "\n";
17 43
18   -?>
29 examples/parallel_processing/random_int_server.php
... ... @@ -1,5 +1,31 @@
1 1 <?php
2   -
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
3 29 require_once(dirname(dirname(__DIR__)) . '/config/config.php');
4 30
5 31 $randomInt = function($data)
@@ -14,4 +40,3 @@
14 40 $server->setCallback($randomInt);
15 41 $server->start();
16 42
17   -?>
28 examples/queue_server/consumer.php
... ... @@ -1,4 +1,31 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29
3 30 require_once(dirname(dirname(__DIR__)) . '/config/config.php');
4 31
@@ -13,4 +40,3 @@
13 40 $consumer->setCallback($myConsumer); //myConsumer could be any valid PHP callback
14 41 $consumer->consume(5); //5 is the number of messages to consume
15 42
16   -?>
28 examples/queue_server/producer.php
... ... @@ -1,4 +1,31 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29
3 30 require_once(dirname(dirname(__DIR__)) . '/config/config.php');
4 31
@@ -6,4 +33,3 @@
6 33 $producer->setExchangeOptions(array('name' => 'hello-exchange', 'type' => 'direct'));
7 34 $producer->publish($argv[1]); //The first argument will be the published message
8 35
9   -?>
28 examples/rpc/rpc_client.php
... ... @@ -1,4 +1,31 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29
3 30 require_once(dirname(dirname(__DIR__)) . '/config/config.php');
4 31
@@ -10,4 +37,3 @@
10 37
11 38 var_dump($replies);
12 39
13   -?>
28 examples/topic/anon_consumer.php
... ... @@ -1,4 +1,31 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29
3 30 require_once(dirname(dirname(__DIR__)) . '/config/config.php');
4 31
@@ -13,4 +40,3 @@
13 40 $consumer->setCallback($myConsumer);
14 41 $consumer->consume(5);
15 42
16   -?>
29 examples/topic/topic_consumer.php
... ... @@ -1,4 +1,31 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29
3 30 require_once(dirname(dirname(__DIR__)) . '/config/config.php');
4 31
@@ -13,5 +40,3 @@
13 40 $consumer->setRoutingKey($argv[1]);
14 41 $consumer->setCallback($myConsumer);
15 42 $consumer->consume(5);
16   -
17   -?>
29 examples/topic/topic_producer.php
... ... @@ -1,9 +1,34 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29
3 30 require_once(dirname(dirname(__DIR__)) . '/config/config.php');
4 31
5 32 $producer = new Thumper\Producer(HOST, PORT, USER, PASS, VHOST);
6 33 $producer->setExchangeOptions(array('name' => 'logs-exchange', 'type' => 'topic'));
7 34 $producer->publish($argv[1], sprintf('%s.%s', $argv[2], $argv[3]));
8   -
9   -?>
38 lib/Thumper/AnonConsumer.php
... ... @@ -1,8 +1,40 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29 namespace Thumper;
3   -require_once(__DIR__ . '/Consumer.php');
4 30 use Thumper\Consumer;
5   -
  31 +/**
  32 + *
  33 + *
  34 + *
  35 + * @category Thumper
  36 + * @package Thumper
  37 + */
6 38 class AnonConsumer extends Consumer
7 39 {
8 40 public function __construct($host, $port, $user, $pass, $vhost)
@@ -14,5 +46,3 @@ public function __construct($host, $port, $user, $pass, $vhost)
14 46 'arguments' => null, 'ticket' => null));
15 47 }
16 48 }
17   -
18   -?>
38 lib/Thumper/BaseAmqp.php
... ... @@ -1,8 +1,42 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29 namespace Thumper;
3 30 use PhpAmqpLib\Connection\AMQPConnection,
  31 + Thumper\BaseAmqp,
4 32 InvalidArgumentException;
5   -
  33 +/**
  34 + *
  35 + *
  36 + *
  37 + * @category Thumper
  38 + * @package Thumper
  39 + */
6 40 class BaseAmqp
7 41 {
8 42 protected $conn;
@@ -90,5 +124,3 @@ protected function getConsumerTag()
90 124 return "PHPPROCESS_".getmypid();
91 125 }
92 126 }
93   -
94   -?>
36 lib/Thumper/BaseConsumer.php
... ... @@ -1,7 +1,40 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29 namespace Thumper;
3   -require_once(__DIR__ . '/BaseAmqp.php');
4 30 use Thumper\BaseAmqp;
  31 +/**
  32 + *
  33 + *
  34 + *
  35 + * @category Thumper
  36 + * @package Thumper
  37 + */
5 38 class BaseConsumer extends BaseAmqp
6 39 {
7 40 protected $callback;
@@ -12,4 +45,3 @@ public function setCallback($callback)
12 45 }
13 46 }
14 47
15   -?>
36 lib/Thumper/Consumer.php
... ... @@ -1,9 +1,41 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29 namespace Thumper;
3   -require_once(__DIR__ . '/BaseConsumer.php');
4 30 use Thumper\BaseConsumer,
5 31 Exception;
6   -
  32 +/**
  33 + *
  34 + *
  35 + *
  36 + * @category Thumper
  37 + * @package Thumper
  38 + */
7 39 class Consumer extends BaseConsumer
8 40 {
9 41 public $consumed = 0;
40 lib/Thumper/Producer.php
... ... @@ -1,9 +1,41 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29 namespace Thumper;
3   -require_once(__DIR__ . '/BaseAmqp.php');
4   -use PhpAmqpLib\Message\AMQPMessage,
5   - Thumper\BaseAmqp;
6   -
  30 +use Thumper\BaseAmqps,
  31 + PhpAmqpLib\Message\AMQPMessage;
  32 +/**
  33 + *
  34 + *
  35 + *
  36 + * @category Thumper
  37 + * @package Thumper
  38 + */
7 39 class Producer extends BaseAmqp
8 40 {
9 41 protected $exchangeReady = false;
36 lib/Thumper/RpcClient.php
... ... @@ -1,10 +1,42 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29 namespace Thumper;
3   -require_once(__DIR__ . '/BaseAmqp.php');
4 30 use PhpAmqpLib\Message\AMQPMessage,
5 31 Thumper\BaseAmqp,
6 32 InvalidArgumentException;
7   -
  33 +/**
  34 + *
  35 + *
  36 + *
  37 + * @category Thumper
  38 + * @package Thumper
  39 + */
8 40 class RpcClient extends BaseAmqp
9 41 {
10 42 protected $requests = 0;
36 lib/Thumper/RpcServer.php
... ... @@ -1,10 +1,42 @@
1 1 <?php
  2 +/**
  3 + * The MIT License
  4 + *
  5 + * Copyright (c) 2010 Alvaro Videla
  6 + *
  7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  8 + * of this software and associated documentation files (the "Software"), to deal
  9 + * in the Software without restriction, including without limitation the rights
  10 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11 + * copies of the Software, and to permit persons to whom the Software is
  12 + * furnished to do so, subject to the following conditions:
  13 + *
  14 + * The above copyright notice and this permission notice shall be included in
  15 + * all copies or substantial portions of the Software.
  16 + *
  17 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23 + * SOFTWARE.
  24 + *
  25 + *
  26 + * @category Thumper
  27 + * @package Thumper
  28 + */
2 29 namespace Thumper;
3   -require_once(__DIR__ . '/BaseConsumer.php');
4 30 use PhpAmqpLib\Message\AMQPMessage,
5 31 Thumper\BaseConsumer,
6 32 Exception;
7   -
  33 +/**
  34 + *
  35 + *
  36 + *
  37 + * @category Thumper
  38 + * @package Thumper
  39 + */
8 40 class RpcServer extends BaseConsumer
9 41 {
10 42 public function initServer($name)

0 comments on commit 6c096d8

Please sign in to comment.
Something went wrong with that request. Please try again.