3 namespace Friendica\Core\Worker\Factory;
5 use Friendica\BaseFactory;
6 use Friendica\Capabilities\ICanCreateFromTableRow;
7 use Friendica\Core\Worker\Entity;
9 class Process extends BaseFactory implements ICanCreateFromTableRow
11 public function createFromTableRow(array $row): Entity\Process
13 return new Entity\Process(
16 new \DateTime($row['created'] ?? 'now', new \DateTimeZone('UTC'))
21 * Creates a new process entry for a given PID
24 * @param string $command
26 * @return Entity\Process
28 public function create(int $pid, string $command): Entity\Process
30 return $this->createFromTableRow([
32 'command' => $command,