mirror of
https://codeberg.org/vlw/wp.git
synced 2026-02-26 03:51:58 +01:00
fix: add docblocks to new methods
This commit is contained in:
parent
7e873c48fa
commit
6409c85a32
1 changed files with 12 additions and 0 deletions
|
|
@ -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}'");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue