Initial commit: AutoBlogger v0.1.0
WordPress plugin that auto-researches topics from Reddit, generates SEO-optimized articles via OpenRouter LLMs, runs them through a chief editor agent, and publishes on a daily schedule. Includes: - Full generation pipeline (collect → analyze → score → generate → review → publish) - Cost tracking and budget enforcement - Admin UI: settings, review queue, metrics, activity log - CI/CD pipeline (GitHub Actions → WordPress REST deploy) - Unit test suite (PHPUnit + Brain Monkey) - Structured logging with configurable verbosity Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
70
includes/models/class-content-request.php
Executable file
70
includes/models/class-content-request.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Value object encapsulating all parameters for a content generation request.
|
||||
*
|
||||
* Bundles the article idea with user-configured generation preferences
|
||||
* (tone, word count, pipeline mode) into a single object passed through the pipeline.
|
||||
*
|
||||
* Triggered by: Content_Generator creates these from Article_Ideas + settings.
|
||||
* Dependencies: None — pure data object.
|
||||
*
|
||||
* @see core/class-content-generator.php — Creates and consumes these.
|
||||
*/
|
||||
class Autoblogger_Content_Request {
|
||||
|
||||
private Autoblogger_Article_Idea $idea;
|
||||
private string $pipeline_mode;
|
||||
private string $tone;
|
||||
private int $min_word_count;
|
||||
private int $max_word_count;
|
||||
private string $niche_description;
|
||||
private array $topic_exclusions;
|
||||
|
||||
public function __construct(
|
||||
Autoblogger_Article_Idea $idea,
|
||||
string $pipeline_mode,
|
||||
string $tone,
|
||||
int $min_word_count,
|
||||
int $max_word_count,
|
||||
string $niche_description,
|
||||
array $topic_exclusions = []
|
||||
) {
|
||||
$this->idea = $idea;
|
||||
$this->pipeline_mode = $pipeline_mode;
|
||||
$this->tone = $tone;
|
||||
$this->min_word_count = $min_word_count;
|
||||
$this->max_word_count = $max_word_count;
|
||||
$this->niche_description = $niche_description;
|
||||
$this->topic_exclusions = $topic_exclusions;
|
||||
}
|
||||
|
||||
public function get_idea(): Autoblogger_Article_Idea {
|
||||
return $this->idea;
|
||||
}
|
||||
|
||||
public function get_pipeline_mode(): string {
|
||||
return $this->pipeline_mode;
|
||||
}
|
||||
|
||||
public function get_tone(): string {
|
||||
return $this->tone;
|
||||
}
|
||||
|
||||
public function get_min_word_count(): int {
|
||||
return $this->min_word_count;
|
||||
}
|
||||
|
||||
public function get_max_word_count(): int {
|
||||
return $this->max_word_count;
|
||||
}
|
||||
|
||||
public function get_niche_description(): string {
|
||||
return $this->niche_description;
|
||||
}
|
||||
|
||||
public function get_topic_exclusions(): array {
|
||||
return $this->topic_exclusions;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user