<?php

/**
 * Created by PhpStorm.
 * User: cgarcia
 * Date: 19/10/2017
 * Time: 11:27
 */
    class toDoXMLClass{

        private $path;

        function __construct( $path ){
            $this->path = $path;
        }

        public function getXMLFile(){
            if(file_exists($this->path)){
                $xml = file_get_contents($this->path);
            }else{
                $xml="0";
            }

            return $xml;
        }


        public function getZipFile(){
            $exist="0";

            if(file_exists($this->path)){
                $exist="1";
            }

            return $exist;

        }

        public function saveFile($file){

            $ok=move_uploaded_file($file, $this->path);
            
            return $ok;
        }
    }
?>