architecture update
This commit is contained in:
parent
59dfbc78ff
commit
6349739a6c
1 changed files with 27 additions and 17 deletions
|
@ -20,8 +20,7 @@ use OpenStack\Common\Error\UserInputError;
|
|||
* ADD CLASS DESCRIPTION
|
||||
*
|
||||
*/
|
||||
class image {
|
||||
//implements Core
|
||||
class image implements Core{
|
||||
|
||||
/** @var App $app protected, contains the main app object */
|
||||
protected $app;
|
||||
|
@ -57,7 +56,18 @@ class image {
|
|||
}
|
||||
|
||||
|
||||
private $images = array();
|
||||
/**
|
||||
* Execute an action
|
||||
*
|
||||
* @param String $action name of another function of this class
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function action($action){
|
||||
|
||||
$this->{$action.""}();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Details about an image
|
||||
|
@ -66,7 +76,7 @@ class image {
|
|||
* options for the image creation
|
||||
*
|
||||
**/
|
||||
public function createImage(array $opt){
|
||||
private function createImage(array $opt){
|
||||
|
||||
if(!isset($opt)){
|
||||
// Renvoyer erreur
|
||||
|
@ -139,7 +149,7 @@ class image {
|
|||
*
|
||||
* @return the list with all images on the server
|
||||
*/
|
||||
public function listImage(){
|
||||
private function listImage(){
|
||||
try{
|
||||
$l = $this->libClass->listImages();
|
||||
if(!isset($l)){ // if the list is empty there is no images
|
||||
|
@ -165,7 +175,7 @@ class image {
|
|||
* identifier of the image
|
||||
*
|
||||
**/
|
||||
public function detailsImage($id){
|
||||
private function detailsImage($id){
|
||||
if(!isset($id)){
|
||||
// Renvoyer erreur
|
||||
}
|
||||
|
@ -197,7 +207,7 @@ class image {
|
|||
* @param array $opt
|
||||
* options for the image creation
|
||||
**/
|
||||
public function updateImage($id, array $opt){
|
||||
private function updateImage($id, array $opt){
|
||||
if(!isset($id)){
|
||||
// Renvoyer erreur
|
||||
}
|
||||
|
@ -253,7 +263,7 @@ class image {
|
|||
* @param string $id
|
||||
* identifier of the image
|
||||
**/
|
||||
public function deleteImage($id){
|
||||
private function deleteImage($id){
|
||||
// si protected = true, demander de le mettre a false
|
||||
// vérifier existence image
|
||||
if(!isset($id)){
|
||||
|
@ -285,7 +295,7 @@ class image {
|
|||
* @param string $id
|
||||
* identifier of the image
|
||||
**/
|
||||
public function reactivateImage($id){
|
||||
private function reactivateImage($id){
|
||||
if(!isset($id)){
|
||||
// Renvoyer erreur
|
||||
}
|
||||
|
@ -314,7 +324,7 @@ class image {
|
|||
* @param string $id
|
||||
* identifier of the image
|
||||
**/
|
||||
public function desactivateImage($id){
|
||||
private function desactivateImage($id){
|
||||
if(!isset($id)){
|
||||
// Renvoyer erreur
|
||||
}
|
||||
|
@ -346,7 +356,7 @@ class image {
|
|||
* @param string $file_name
|
||||
* path of the image
|
||||
**/
|
||||
public function uploadImage($id, $file_name){
|
||||
private function uploadImage($id, $file_name){
|
||||
if(!isset($id)){
|
||||
// Renvoyer erreur
|
||||
}
|
||||
|
@ -379,7 +389,7 @@ class image {
|
|||
* @param string $id
|
||||
* identifier of the image
|
||||
**/
|
||||
public function downloadImage($id){
|
||||
private function downloadImage($id){
|
||||
if(!isset($id)){
|
||||
// Renvoyer erreur
|
||||
}
|
||||
|
@ -412,7 +422,7 @@ class image {
|
|||
* @param string $member_id
|
||||
* identifier of the member
|
||||
**/
|
||||
public function addMemberImage($image_id, $member_id){
|
||||
private function addMemberImage($image_id, $member_id){
|
||||
if(!isset($image_id)){
|
||||
// Renvoyer erreur
|
||||
}
|
||||
|
@ -449,7 +459,7 @@ class image {
|
|||
* @param string $image_id
|
||||
* identifier of the image
|
||||
**/
|
||||
public function listMemberImage($image_id, $member_id){
|
||||
private function listMemberImage($image_id, $member_id){
|
||||
if(!isset($image_id)){
|
||||
// Renvoyer erreur
|
||||
}
|
||||
|
@ -488,7 +498,7 @@ class image {
|
|||
* @param string $member_id
|
||||
* identifier of the member
|
||||
**/
|
||||
public function detailMemberImage($image_id, $member_id){
|
||||
private function detailMemberImage($image_id, $member_id){
|
||||
if(!isset($image_id)){
|
||||
// Renvoyer erreur
|
||||
}
|
||||
|
@ -531,7 +541,7 @@ class image {
|
|||
* @param string $member_id
|
||||
* identifier of the member
|
||||
**/
|
||||
public function removeMemberImage($image_id, $member_id){
|
||||
private function removeMemberImage($image_id, $member_id){
|
||||
if(!isset($image_id)){
|
||||
// Renvoyer erreur
|
||||
}
|
||||
|
@ -576,7 +586,7 @@ class image {
|
|||
* @param string $status
|
||||
* new status for the member
|
||||
**/
|
||||
public function updateMemberImage($image_id, $member_id, $status){
|
||||
private function updateMemberImage($image_id, $member_id, $status){
|
||||
if(!isset($image_id)){
|
||||
// Renvoyer erreur
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue