for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Anomaly\Streams\Platform\Stream\Command;
use Anomaly\Streams\Platform\Stream\Contract\StreamRepositoryInterface;
use Illuminate\Contracts\Bus\SelfHandling;
/**
* Class GetStreams
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <[email protected]>
* @author Ryan Thompson <[email protected]>
* @package Anomaly\Streams\Platform\Stream\Command
*/
class GetStreams implements SelfHandling
{
* The stream namespace.
* @var string
protected $namespace;
* Create a new GetStreams instance.
* @param string $namespace
public function __construct($namespace)
$this->namespace = $namespace;
}
* Handle the command.
* @param StreamRepositoryInterface $streams
* @return \Anomaly\Streams\Platform\Stream\Contract\StreamInterface|null
public function handle(StreamRepositoryInterface $streams)
return $streams->findAllByNamespace($this->namespace);