Phly Documentation Phly
[ return to channel ] [ class tree: Phly ] [ index: Phly ] [ all elements ]

Source for file Php.php

Documentation is available at Php.php

  1. <?php
  2. /**
  3. * PHLY - PHp LibrarY
  4. *
  5. * PHLY is a library of PHP classes designed with the following intentions:
  6. * - Loosely coupled; dependencies should be few, and no base class should be
  7. * necessary.
  8. * - Extendible; all classes should be easily extendible. This may be via
  9. * observers, interfaces, adapters, etc.. The base class should solve 80% of
  10. * usage, and allow extensions to the class to fill in the remainder.
  11. * - Designed for PHP5 and up; all classes should make use of PHP5's features.
  12. * - Documented; all classes should minimally have excellent API-level
  13. * documentation, with use cases in the class docblock.
  14. * - Tested; all classes should have (passing) unit tests accompanying them.
  15. * - Open source and commercial friendly; all classes should use a
  16. * commercial-friendly open source license. The BSD license is one such
  17. * example.
  18. *
  19. * @license New BSD, http://www.opensource.org/licenses/bsd-license.php
  20. * @package Phly
  21. * @copyright 2006 - Present, Matthew Weier O'Phinney
  22. */
  23.  
  24. /**
  25. * Implements Phly_Config_Adapter_Interface
  26. */
  27. require_once 'Phly/Config/Adapter/Interface.php';
  28.  
  29. /**
  30. * Phly_Config PHP Array adapter
  31. *
  32. * Loads a file specified by $source, and returns the return value of that PHP
  33. * file.
  34. *
  35. * @category Phly
  36. * @subcategory Phly_Config
  37. * @subpackage Phly_Config
  38. * @copyright 2006 - Present, Matthew Weier O'Phinney
  39. * @author Matthew Weier O'Phinney <mweierophinney@gmail.com>
  40. * @version @release-version@
  41. */
  42. class Phly_Config_Adapter_Php implements Phly_Config_Adapter_Interface
  43. {
  44. /**
  45. * Load a configuration array from $source
  46. *
  47. * @static
  48. * @access public
  49. * @param string $source
  50. * @return array
  51. */
  52. public static function load($source)
  53. {
  54. $array = include $source;
  55.  
  56. return $array;
  57. }
  58. }