Ghost Exploiter Team Official
Mass Deface
Directory >>
/
var
/
www
/
html
/
back
/
vendor
/
safemood
/
laravel-workflow
/
src
/
Traits
/
Mass Deface Auto Detect Domain
/*Ubah Ke document_root untuk mass deface*/
File / Folder
Size
Action
.
-
type
file
dir
+File/Dir
ActionsTrait.php
1.589KB
edt
ren
Dumpable.php
0.484KB
edt
ren
HasResponses.php
0.438KB
edt
ren
ManagesExecution.php
3.006KB
edt
ren
RegistersObservers.php
1.615KB
edt
ren
TracksActionStates.php
1.368KB
edt
ren
TracksEvents.php
1.971KB
edt
ren
WorkflowTraits.php
0.229KB
edt
ren
<?php namespace Safemood\Workflow\Traits; use Illuminate\Foundation\Bus\Dispatchable as DispatchableJob; use Illuminate\Foundation\Events\Dispatchable as DispatchableEvent; use Safemood\Workflow\Contracts\DTOInterface; use Safemood\Workflow\Enums\ActionState; trait ManagesExecution { protected $autoBootObservers = true; protected $stopOnFailure = true; public function run(DTOInterface &$context, bool $stopOnFailure = true, bool $autoBootObservers = true) { $this->setAutoBootObservers($autoBootObservers); $this->setStopOnFailure($stopOnFailure); $this->handle($context); $this->execute($context); return $this; } public function setAutoBootObservers(bool $value) { $this->autoBootObservers = $value; } public function setStopOnFailure(bool $value) { $this->stopOnFailure = $value; } public function getAutoBootObservers(): bool { return $this->autoBootObservers; } public function getStopOnFailure(): bool { return $this->stopOnFailure; } protected function execute(DTOInterface $context) { try { if ($this->autoBootObservers && method_exists($this, 'bootObserversIfNeeded')) { $this->bootObserversIfNeeded(); } $this->executeWorkflowActions($context); } catch (\Exception $e) { throw $e; } } protected function executeWorkflowActions(DTOInterface &$context) { if (! $this->executeActions($this->beforeActions, $context)) { return; } if (! $this->executeActions($this->mainActions, $context)) { return; } if (! $this->executeActions($this->afterActions, $context)) { return; } } protected function executeActions(array $actions, DTOInterface &$context) { foreach ($actions as $action) { $this->initializeActionState($action); try { if ($this->isDispatchable($action)) { $this->dispatchAction($action, $context); } else { $this->handleAction($action, $context); } $this->updateActionState($action, ActionState::SUCCESS); } catch (\Exception $e) { $this->updateActionState($action, ActionState::FAILED, $e); if ($this->stopOnFailure) { return false; } } } return true; } protected function handleAction($action, DTOInterface &$context) { $action->handle($context); } protected function isDispatchable($action): bool { $traits = class_uses($action); return ! empty(array_intersect($traits, [ DispatchableJob::class, DispatchableEvent::class, ])); } protected function dispatchAction($action, DTOInterface &$context): void { $action::dispatch($context); } }