diff --git a/src/ncc/Objects/ProjectConfiguration/UpdateSource/Repository.php b/src/ncc/Objects/ProjectConfiguration/UpdateSource/Repository.php new file mode 100644 index 0000000..69cb7b4 --- /dev/null +++ b/src/ncc/Objects/ProjectConfiguration/UpdateSource/Repository.php @@ -0,0 +1,70 @@ + $this->Name, + ($bytecode ? Functions::cbc('type') : 'type') => $this->Type, + ($bytecode ? Functions::cbc('host') : 'host') => $this->Host, + ($bytecode ? Functions::cbc('ssl') : 'ssl') => $this->SSL + ]; + } + + /** + * Constructs object from an array representation + * + * @param array $data + * @return Repository + */ + public static function fromArray(array $data): self + { + $obj = new self(); + $obj->Name = Functions::array_bc($data, 'name'); + $obj->Type = Functions::array_bc($data, 'type'); + $obj->Host = Functions::array_bc($data, 'host'); + $obj->SSL = Functions::array_bc($data, 'ssl'); + return $obj; + } + } \ No newline at end of file