<?php
namespace Oreolek;
class Publisher {
public $text;
protected $dry_run = true;
public function __construct($config) {
$this->dry_run = $config['DRY_RUN'];
}
protected function _publish(string $text): void {
public function publish(string $text): void {
if (empty($this->client)) {
return;
try {
$this->_publish($text);
} catch (\Exception $e) {
echo $e;
if (!$this->dry_run) {
file_put_contents('.lastrun', time());