src/Rocketeer/Services/Tasks/TasksHandler.php
public function getTasksListeners($task, $event, $flatten = false)
    {
        // Get events
        $task = $this->builder->buildTaskFromClass($task);
        $handle = $this->getEventHandle($task, $event);
        $events = $this->events->getListeners($handle);

        // Flatten the queue if requested
        foreach ($events as $key => $listener) {
            if ($flatten && $listener instanceof ClosureTask && $stringTask = $listener->getStringTask()) {
                $events[$key] = $stringTask;
            } elseif ($flatten && $listener instanceof AbstractTask) {
                $events[$key] = $listener->getSlug();
            }
        }

        return $events;
    }
public function getTasksListeners($task, $event, $flatten = false)
    {
        // Get events
        $task = $this->builder->buildTaskFromClass($task);
        $handle = $this->getEventHandle($task, $event);
        $events = $this->events->getListeners($handle);

        // Flatten the queue if requested
        foreach ($events as $key => $listener) {
            if ($flatten && $listener instanceof ClosureTask && $stringTask = $listener->getStringTask()) {
                $events[$key] = $stringTask;
            } elseif ($flatten && $listener instanceof AbstractTask) {
                $events[$key] = $listener->getSlug();
            }
        }

        return $events;
    }
public function getTasksListeners ( $ task , $ event , $ flatten = false ) { // Get events $ task = $ this -> builder -> buildTaskFromClass ( $ task ) ; $ handle = $ this -> getEventHandle ( $ task , $ event ) ; $ events = $ this -> events -> getListeners ( $ handle ) ; // Flatten the queue if requested foreach ( $ events as $ key => $ listener ) { if ( $ flatten && $ listener instanceof ClosureTask && $ stringTask = $ listener -> getStringTask ( ) ) { $ events [ $ key ] = $ stringTask ; } elseif ( $ flatten && $ listener instanceof AbstractTask ) { $ events [ $ key ] = $ listener -> getSlug ( ) ; } } return $ events ; }
Get all of a task's listeners.

@param string|AbstractTask $task
@param string              $event
@param bool                $flatten

@return array
Get all of a task s listeners .