diff --git a/src/Posts/Type/Attachment.php b/src/Posts/Type/Attachment.php index 5e5cd2c..4257a61 100644 --- a/src/Posts/Type/Attachment.php +++ b/src/Posts/Type/Attachment.php @@ -91,10 +91,22 @@ get => file_get_contents($this->post->guid); } + /** + * Set the pathname for this Attachemnt to a file on disk + * + * @param string $pathname + * @return void + */ public function set_attached_file(string $pathname): void { PostMeta::new($this->post, self::META_KEY_WP_ATTACHED_FILE, $pathname); } + /** + * Set Attachemnt data from a file on disk + * + * @param string $file + * @return void + */ public function set_from_file(string $file): void { if (!is_file($file)) { throw new Exception("No file found at location '{$file}'");