Ignore:
Timestamp:
Aug 25, 2014 7:37:45 PM (11 years ago)
Author:
dungnv
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-bachkim-filespace/sourcecode/application/libraries/vservices.php

    r42 r66  
    66        private $_curlObj;
    77        private $_userId;
     8        private $_password;
    89       
    910        public function __construct() {
     
    2324        }
    2425       
     26        public function setPassword ($password) {
     27                $this->_password = $password;
     28        }
     29       
    2530        public function getPrivateTree () {
    2631                $this->_curlObj->create($this->_apiUrl. 'space/dir/isgetall/1');
     
    3035                $post = array('userid' => $this->_userId);
    3136                $this->_curlObj->post($post);
     37                return $this->_curlObj->execute();
     38        }
     39       
     40        /**
     41         * $aryParams
     42         *
     43         * @param unknown $action
     44         * @param unknown $aryParams
     45         */
     46        public function actionExecute ($action, $aryParams = array()) {
     47                $this->_curlObj->create($this->_apiUrl. 'space/'.$action);
     48                $this->_curlObj->option(CURLOPT_BUFFERSIZE, 10);
     49                $this->_curlObj->options(array(CURLOPT_BUFFERSIZE => 10));
     50               
     51                $aryParams['userid'] = $this->_userId;
     52                $this->_curlObj->post($aryParams);
    3253                return $this->_curlObj->execute();
    3354        }
     
    4263                return $this->_curlObj->execute();
    4364        }
     65       
     66        public function deleteDir ($dirId) {
     67                $this->_curlObj->create($this->_apiUrl. 'space/delete');
     68                $this->_curlObj->option(CURLOPT_BUFFERSIZE, 10);
     69                $this->_curlObj->options(array(CURLOPT_BUFFERSIZE => 10));
     70               
     71                $post = array('userid' => $this->_userId, 'type' => 'folder', 'id' => $dirId);
     72                $this->_curlObj->post($post);
     73                return $this->_curlObj->execute();
     74        }
    4475               
    4576        public function __destruct() {
Note: See TracChangeset for help on using the changeset viewer.