Jarves\Utils::getComposerArray PHP Метод

getComposerArray() публичный Метод

public getComposerArray ( $bundleClass )
    public function getComposerArray($bundleClass)
    {
        $path = $this->jarves->getBundleDir($bundleClass);
        $fs = $this->localFilesystem;
        if ($fs->has($file = $path . '/composer.json')) {
            return json_decode($fs->read($file), true);
        }
    }

Usage Example

Пример #1
0
 /**
  * @ApiDoc(
  *  section="Bundle Editor",
  *  description="Saves the composer config"
  * )
  *
  * @Rest\QueryParam(name="bundle", requirements=".*", strict=true, description="The bundle name")
  *
  * @Rest\Post("/admin/system/bundle/editor/config")
  *
  * @param string $bundle
  *
  * @return array
  */
 public function saveConfigAction($bundle)
 {
     if ($this->jarves->getBundleDir($bundle)) {
         $config = $this->utils->getComposerArray($bundle);
         $config['_path'] = $this->jarves->getBundleDir($bundle);
         return $config;
     }
     return "#todo";
 }
All Usage Examples Of Jarves\Utils::getComposerArray