protected function evaluate()
 {
     $classNameOrPath = $this->getCondition();
     if (Platform::classExists($classNameOrPath)) {
         $this->setStateText(sprintf(mt('setup', 'The %s is available.', 'setup.requirement.class'), $this->getAlias() ?: $classNameOrPath . ' ' . mt('setup', 'class', 'setup.requirement.class')));
         return true;
     } else {
         $this->setStateText(sprintf(mt('setup', 'The %s is missing.', 'setup.requirement.class'), $this->getAlias() ?: $classNameOrPath . ' ' . mt('setup', 'class', 'setup.requirement.class')));
         return false;
     }
 }
Beispiel #2
0
 protected function evaluate()
 {
     return Platform::classExists($this->getCondition());
 }