文件操作 - DataProvider.php
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/ionos-loop/inc/data/DataProvider.php
编辑文件内容
<?php namespace Ionos\Loop\Data; /** * Abstract class for Data Providers in the Rest API. */ abstract class DataProvider { /** * The data for the data provider. * * @var string */ private $data; /** * Constructor, calls the collect function and gets all data ready. */ public function __construct() { $this->set_data( $this->collect_data() ); } /** * Stores the provided data. * * @param array $data Data which was collected. * * @return void */ protected function set_data( $data ) { $this->data = $data; } /** * Returns the data. * * @return string */ public function get_data() { return $this->data; } /** * Collects the required data, and returns these. * * @return array */ abstract protected function collect_data(); }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件