111 lines
1.8 KiB
PHP
111 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Common\Files;
|
|
|
|
use \App\Core\Template\Output as Output;
|
|
use \App\Common\Files\Classes\Files as Files;
|
|
|
|
class FilesController {
|
|
|
|
/**
|
|
* Index
|
|
* Show the main Files list
|
|
*/
|
|
function index(){
|
|
Output::setView('index');
|
|
$list = Array();
|
|
|
|
for($i = 0; $i <= 10; $i++){
|
|
$obj = Array();
|
|
$obj['id'] = $i;
|
|
$obj['value'] = md5($i);
|
|
$obj['description'] = sha1($i);
|
|
$list[] = $obj;
|
|
}
|
|
Output::addValue('list', $list );
|
|
Output::render();
|
|
}
|
|
|
|
/**
|
|
* Create
|
|
*
|
|
* Render the main Files formulary
|
|
*/
|
|
function create(){
|
|
Output::setView('form', ['id' => 0]);
|
|
Output::render();
|
|
}
|
|
|
|
/**
|
|
* Store
|
|
*
|
|
* Store the param on the database
|
|
* @param Files $files
|
|
*/
|
|
function store(Files $files){
|
|
|
|
}
|
|
|
|
/**
|
|
* Search
|
|
*
|
|
* Store the param on the database
|
|
* @param Files $files
|
|
*/
|
|
function search(){
|
|
|
|
}
|
|
|
|
/**
|
|
* Show
|
|
*
|
|
* Render one register
|
|
*
|
|
* @param Files $files
|
|
*/
|
|
function show(Files $files){
|
|
|
|
}
|
|
|
|
/**
|
|
* Edit
|
|
*
|
|
* Render the formular for a database Files
|
|
*
|
|
* @param Files $files
|
|
*/
|
|
function edit(Files $files){
|
|
Output::setView('form', $files);
|
|
Output::render();
|
|
}
|
|
|
|
/**
|
|
* Update
|
|
* Store the changes of the param on the database
|
|
*
|
|
* @param Files $files
|
|
*/
|
|
function update(Files $files){
|
|
|
|
}
|
|
|
|
/**
|
|
* Destroy
|
|
* If the object has soft delete.
|
|
*
|
|
* @param Files $files
|
|
*/
|
|
function destroy(Files $files){
|
|
|
|
}
|
|
|
|
/**
|
|
* Purge
|
|
* Remove object even with soft delete.
|
|
*
|
|
* @param Files $files
|
|
*/
|
|
function purge(Files $files){
|
|
|
|
}
|
|
} |