Package.php 610 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * @package Grav\Common\GPM
  4. *
  5. * @copyright Copyright (C) 2015 - 2019 Trilby Media, LLC. All rights reserved.
  6. * @license MIT License; see LICENSE file for details.
  7. */
  8. namespace Grav\Common\GPM\Remote;
  9. use Grav\Common\Data\Data;
  10. use Grav\Common\GPM\Common\Package as BasePackage;
  11. class Package extends BasePackage implements \JsonSerializable
  12. {
  13. public function __construct($package, $package_type = null)
  14. {
  15. $data = new Data($package);
  16. parent::__construct($data, $package_type);
  17. }
  18. public function jsonSerialize()
  19. {
  20. return $this->data;
  21. }
  22. }