選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

42 行
772B

  1. <?php
  2. /**
  3. * @link http://www.yiiframework.com/
  4. * @copyright Copyright (c) 2008 Yii Software LLC
  5. * @license http://www.yiiframework.com/license/
  6. */
  7. namespace yii\debug\components\search\matchers;
  8. use yii\base\Component;
  9. /**
  10. * Base class for matchers that are used in a filter.
  11. *
  12. * @author Mark Jebri <mark.github@yandex.ru>
  13. * @since 2.0
  14. */
  15. abstract class Base extends Component implements MatcherInterface
  16. {
  17. /**
  18. * @var mixed base value to check
  19. */
  20. protected $baseValue;
  21. /**
  22. * @inheritdoc
  23. */
  24. public function setValue($value)
  25. {
  26. $this->baseValue = $value;
  27. }
  28. /**
  29. * @inheritdoc
  30. */
  31. public function hasValue()
  32. {
  33. return !empty($this->baseValue) || ($this->baseValue === '0');
  34. }
  35. }