How can I edit YAML Code: $this->con[CON]; 1. clear all of contents in YAML 2. clear a part of what I want in YAML 3. restore YAML contents 4. remove YAML and lastly what is difference of $this->con[CON] and $this->con[CON][]
Before you must use Config. PHP: $config = new Config("yamlPath", Config::YAML); 1-) Clear all contents of YAML. PHP: $config->setAll([]); 2-) Clear a part from YAML: PHP: $config->remove("key'"); 3-) Config class already created for i/o process in YAML / JSON etc. files. 4-) Remove YAML (or any file in PHP) PHP: unlink("filepath"); Don't forget save the Config when you use setting functions. PHP: $config->save(); Save function apply the changes on Config in YAML.