/** * VERIFICA SI EXISTE EL ARCHIVO config.json en dado caso exista retorna * un stdclass u objeto de ella */ public function GetConfigPlugin($path = null) { if ($path == null) { $path = ""; } $path = $path . "config.json"; $json_class = new \SivarApi\Tools\Json_class(); $json_class->JsonFile($path); return $json_class->GetDecodeJsonFile(JSON_CLASS); }
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ include '/Conf/Include.php'; $jason_ = new \SivarApi\Tools\Json_class(); $jason_->JsonFile('file/example.json'); print_r($jason_->GetDecodeJsonFile());