refactor! v1.1
This commit is contained in:
@@ -1,25 +1,15 @@
|
||||
<?php
|
||||
class GiteaData{
|
||||
|
||||
private $data=null;
|
||||
protected $data=null;
|
||||
|
||||
public function __construct(Repo $repo,$data){
|
||||
$this->repo=$repo;
|
||||
$this->data=$data;
|
||||
public function __construct($data=null){
|
||||
if(!$data){
|
||||
$data=new stdClass();
|
||||
}
|
||||
$this->data=$data;
|
||||
}
|
||||
|
||||
public function save(){
|
||||
return $this->request($this->data->url,'PATCH',$this->data);
|
||||
}
|
||||
|
||||
public function getData(){
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
public function getRepo(){
|
||||
return $this->repo;
|
||||
}
|
||||
|
||||
public function __set($k,$v){
|
||||
$this->data->$k=$v;
|
||||
}
|
||||
|
Reference in New Issue
Block a user