-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f4076a
commit e030231
Showing
8 changed files
with
154 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Illuminate\Queue; | ||
|
||
use InvalidArgumentException; | ||
|
||
class InvalidPayloadException extends InvalidArgumentException | ||
{ | ||
/** | ||
* Create a new exception instance. | ||
* | ||
* @param string|null $message | ||
* @return void | ||
*/ | ||
public function __construct($message = null) | ||
{ | ||
parent::__construct($message ?: json_last_error()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace Illuminate\Queue\Jobs; | ||
|
||
use Illuminate\Support\Arr; | ||
|
||
class JobName | ||
{ | ||
/** | ||
* Parse the given job name into a class / method array. | ||
* | ||
* @param string $job | ||
* @return array | ||
*/ | ||
public static function parse($job) | ||
{ | ||
$segments = explode('@', $job); | ||
|
||
return count($segments) > 1 ? $segments : [$segments[0], 'fire']; | ||
} | ||
|
||
/** | ||
* Get the resolved name of the queued job class. | ||
* | ||
* @param string $name | ||
* @param array $payload | ||
* @return string | ||
*/ | ||
public static function resolve($name, $payload) | ||
{ | ||
if ($name === 'Illuminate\Queue\CallQueuedHandler@call') { | ||
return Arr::get($payload, 'data.commandName', $name); | ||
} | ||
|
||
if ($name === 'Illuminate\Events\CallQueuedHandler@call') { | ||
return $payload['data']['class'].'@'.$payload['data']['method']; | ||
} | ||
|
||
return $name; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Why is this place so changed? What is the problem?