@@ -66,7 +66,7 @@ public function getAll()
6666 */
6767 public function enable (string $ field , $ value ): bool
6868 {
69- return $ this ->setProperty ($ field , $ value , 'status ' , 0 );
69+ return $ this ->setProperties ($ field , $ value , [ 'status ' => 0 ] );
7070 }
7171
7272 /**
@@ -77,24 +77,25 @@ public function enable(string $field, $value): bool
7777 */
7878 public function disable (string $ field , $ value ): bool
7979 {
80- return $ this ->setProperty ($ field , $ value , 'status ' , 1 );
80+ return $ this ->setProperties ($ field , $ value , [ 'status ' => 1 ] );
8181 }
8282
8383 /**
8484 * @param string $field
8585 * @param int|string $value
86- * @param string $property
87- * @param int|string $propertyValue
86+ * @param array $properties
8887 *
8988 * @return bool
9089 */
91- public function setProperty (string $ field , $ value , string $ property , $ propertyValue ): bool
90+ public function setProperties (string $ field , $ value , array $ properties ): bool
9291 {
9392 $ packet = $ this ->_client ->getPacket ();
9493 $ setTag = $ packet ->addChild ($ this ->_wrapperTag )->addChild ('set ' );
9594 $ setTag ->addChild ('filter ' )->addChild ($ field , (string ) $ value );
9695 $ genInfoTag = $ setTag ->addChild ('values ' )->addChild ('gen_info ' );
97- $ genInfoTag ->addChild ($ property , (string ) $ propertyValue );
96+ foreach ($ properties as $ property => $ propertyValue ) {
97+ $ genInfoTag ->addChild ($ property , (string ) $ propertyValue );
98+ }
9899
99100 $ response = $ this ->_client ->request ($ packet );
100101
0 commit comments