FilePermissionsExample.php 653 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * This file is part of vfsStream.
  4. *
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. *
  8. * @package org\bovigo\vfs
  9. */
  10. namespace org\bovigo\vfs\example;
  11. /**
  12. * Example showing correct file permission support introduced with 0.7.0.
  13. */
  14. class FilePermissionsExample
  15. {
  16. /**
  17. * reads configuration from given config file
  18. *
  19. * @param mixed $config
  20. * @param string $configFile
  21. */
  22. public function writeConfig($config, $configFile)
  23. {
  24. @file_put_contents($configFile, serialize($config));
  25. }
  26. // more methods here
  27. }
  28. ?>