PageRenderTime 60ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/library/Ecart/Collect/Skin.php

https://code.google.com/p/ecartcommerce/
PHP | 64 lines | 21 code | 2 blank | 41 comment | 3 complexity | 3de7f7855bc57aef9094479a1080af84 MD5 | raw file
Possible License(s): GPL-3.0, LGPL-2.1
  1. <?php
  2. /**
  3. * Ecart
  4. *
  5. * This file is part of Ecart.
  6. *
  7. * Ecart is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation, either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * Ecart is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with Ecart. If not, see <http://www.gnu.org/licenses/>.
  19. *
  20. * @category Ecart
  21. * @package Ecart_View
  22. * @copyright Copyright 2008-2009 E-Cart LLC
  23. * @license GNU Public License V3.0
  24. */
  25. /**
  26. *
  27. * @category Ecart
  28. * @package Ecart_View
  29. * @subpackage Collect
  30. * @author Ecart Core Team <core@ecartcommerce.com>
  31. */
  32. class Ecart_Collect_Skin implements Ecart_Collect_Interface
  33. {
  34. /**
  35. *
  36. * @static
  37. * @return array
  38. */
  39. public static function collect()
  40. {
  41. $path = Ecart::config()->system->path . '/app/design/front';
  42. $dh = opendir($path);
  43. $skins = array();
  44. while (($file = readdir($dh))) {
  45. if ($file[0] == '.')
  46. continue;
  47. $skins[$file] = $file;
  48. }
  49. closedir($dh);
  50. return $skins;
  51. }
  52. /**
  53. *
  54. * @static
  55. * @param string $id
  56. * @return string
  57. */
  58. public static function getName($id)
  59. {
  60. return $id;
  61. }
  62. }