php - how to edit yml file string in phar file? -


im trying php script edit string in yml file in phar file looked question

modify yaml file php script

but didnt work

and tried code no luck

  $phar = new \phar($file);     if (isset($phar["plugin.yml"])) {         $pluginyml = $phar["plugin.yml"];         if ($pluginyml instanceof \pharfileinfo) {             $description = new plugindescription($pluginyml->getcontent());             if (!$this->server->getpluginmanager()->getplugin($description->getname()) instanceof plugin , !in_array($this->server->getapiversion(), $description->getcompatibleapis())) {                 $api = (new \reflectionclass("pocketmine\plugin\plugindescription"))->getproperty("api");                 $api->setaccessible(true);                 $api->setvalue($description, [$this->server->getapiversion()]);                 return $description; 


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -