1 | <?php namespace Arcanedev\Composer\Entities; |
||
14 | class PackageJson |
||
15 | { |
||
16 | /* ----------------------------------------------------------------- |
||
17 | | Main Methods |
||
18 | | ----------------------------------------------------------------- |
||
19 | */ |
||
20 | |||
21 | /** |
||
22 | * Read the contents of a composer.json style file into an array. |
||
23 | * |
||
24 | * The package contents are fixed up to be usable to create a Package object |
||
25 | * by providing dummy "name" and "version" values if they have not been provided in the file. |
||
26 | * This is consistent with the default root package loading behavior of Composer. |
||
27 | * |
||
28 | * @param string $path |
||
29 | * |
||
30 | * @return array |
||
31 | */ |
||
32 | 99 | public static function read($path) |
|
47 | |||
48 | /** |
||
49 | * Convert json to Package. |
||
50 | * |
||
51 | * @param array $json |
||
52 | * |
||
53 | * @return \Composer\Package\CompletePackage |
||
54 | * |
||
55 | * @throws \Arcanedev\Composer\Exceptions\InvalidPackageException |
||
56 | */ |
||
57 | 99 | public static function convert(array $json) |
|
73 | } |
||
74 |