PHP 클래스 Inpsyde\MultilingualPress\SiteDuplication\WPDBAttachmentCopier

부터: 3.0.0
상속: implements Inpsyde\MultilingualPress\SiteDuplication\AttachmentCopier
파일 보기 프로젝트 열기: inpsyde/multilingual-press

공개 메소드들

메소드 설명
__construct ( Inpsyde\MultilingualPress\Common\BasePathAdapter $base_path_adapter, Inpsyde\MultilingualPress\Database\TableStringReplacer $table_string_replacer ) Constructor. Sets up the properties.
copy_attachments ( integer $source_site_id ) : boolean Copies all attachment files of the site with given ID to the current site.

비공개 메소드들

메소드 설명
copy_dir ( array $paths, string $source_dir, string $destination_dir ) : void Copies all given files from one site to another.
get_attachment_paths ( ) : string[] Extracts all registered attachment paths from the database.
update_attachment_urls ( string $source_url, string $destination_url ) : void Updates attachment URLs according to the given arguments

메소드 상세

__construct() 공개 메소드

Constructor. Sets up the properties.
부터: 3.0.0
public __construct ( Inpsyde\MultilingualPress\Common\BasePathAdapter $base_path_adapter, Inpsyde\MultilingualPress\Database\TableStringReplacer $table_string_replacer )
$base_path_adapter Inpsyde\MultilingualPress\Common\BasePathAdapter Base path adapter object.
$table_string_replacer Inpsyde\MultilingualPress\Database\TableStringReplacer Table string replacer object.

copy_attachments() 공개 메소드

Copies all attachment files of the site with given ID to the current site.
부터: 3.0.0
public copy_attachments ( integer $source_site_id ) : boolean
$source_site_id integer Source site ID.
리턴 boolean Whether or not any attachment files were copied.