Skip to content

Commit 7439b12

Browse files
committed
class LINEMSG_Template add set()
1 parent bccf13d commit 7439b12

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

api.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,17 @@ public function __construct($template){
561561
}
562562
}
563563

564+
public function set($var, $value = null){
565+
if(gettype($var) == "array"){
566+
$keys = array_keys($this->object);
567+
foreach($var as $num => $run){
568+
$this->set($keys[$num+1], $run);
569+
}
570+
}else{
571+
$this->object[$var] = $value;
572+
}
573+
}
574+
564575
public function out(){
565576
return $this->object;
566577
}

0 commit comments

Comments
 (0)