Util.php 542 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * PHP表单生成器
  4. *
  5. * @package FormBuilder
  6. * @author xaboy <xaboy2005@qq.com>
  7. * @version 2.0
  8. * @license MIT
  9. * @link https://github.com/xaboy/form-builder
  10. * @document http://php.form-create.com
  11. */
  12. namespace FormBuilder;
  13. use FormBuilder\Contract\CustomComponentInterface;
  14. use FormBuilder\Contract\FormComponentInterface;
  15. class Util
  16. {
  17. public static function isComponent($component)
  18. {
  19. return $component instanceof CustomComponentInterface || $component instanceof FormComponentInterface;
  20. }
  21. }