CompiledJsonFile.php 580 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * @package Grav\Common\File
  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\File;
  9. use RocketTheme\Toolbox\File\JsonFile;
  10. class CompiledJsonFile extends JsonFile
  11. {
  12. use CompiledFile;
  13. /**
  14. * Decode RAW string into contents.
  15. *
  16. * @param string $var
  17. * @param bool $assoc
  18. * @return array mixed
  19. */
  20. protected function decode($var, $assoc = true)
  21. {
  22. return (array)json_decode($var, $assoc);
  23. }
  24. }