/library/Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php

https://bitbucket.org/hamidrezas/melobit · PHP · 43 lines · 8 code · 2 blank · 33 comment · 0 complexity · 6bd7ef1498db47caf03f19884999eb01 MD5 · raw file

  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Tool
  17. * @subpackage Framework
  18. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id: EnabledResourceFilter.php 24594 2012-01-05 21:27:01Z matthew $
  21. */
  22. /**
  23. * This class is an iterator that will iterate only over enabled resources
  24. *
  25. * @category Zend
  26. * @package Zend_Tool
  27. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  28. * @license http://framework.zend.com/license/new-bsd New BSD License
  29. */
  30. class Zend_Tool_Project_Profile_Iterator_EnabledResourceFilter extends RecursiveFilterIterator
  31. {
  32. /**
  33. * accept() is required by teh RecursiveFilterIterator
  34. *
  35. * @return bool
  36. */
  37. public function accept()
  38. {
  39. return $this->current()->isEnabled();
  40. }
  41. }