modern-events-calendar-lite/app/core/puc/Puc/v4p11/Update.php

35 lines
739 B
PHP
Raw Normal View History

2024-10-15 12:04:03 +02:00
<?php
if ( !class_exists('Puc_v4p11_Update', false) ):
/**
* A simple container class for holding information about an available update.
*
* @author Janis Elsts
* @access public
*/
abstract class Puc_v4p11_Update extends Puc_v4p11_Metadata {
public $slug;
public $version;
public $download_url;
public $translations = [];
/**
* @return string[]
*/
protected function getFieldNames() {
return array('slug', 'version', 'download_url', 'translations');
}
public function toWpFormat() {
$update = new stdClass();
$update->slug = $this->slug;
$update->new_version = $this->version;
$update->package = $this->download_url;
return $update;
}
}
endif;