public function getChecker()
    {
        if (!isset($this->checker)) {
            $interval = $this->getUpdateCheck();
            switch ($interval) {
                case Checker::ALWAYS:
                    $this->checker = new GitHubChecker();
                    break;

                case Checker::DAILY:
                case Checker::WEEKLY:
                case Checker::MONTHLY:
                    $checkFile = $this->getUpdateCheckCacheFile();
                    if ($checkFile === false) {
                        $this->checker = new NoopChecker();
                    } else {
                        $this->checker = new IntervalChecker($checkFile, $interval);
                    }
                    break;

                case Checker::NEVER:
                    $this->checker = new NoopChecker();
                    break;
            }
        }

        return $this->checker;
    }
public function getChecker()
    {
        if (!isset($this->checker)) {
            $interval = $this->getUpdateCheck();
            switch ($interval) {
                case Checker::ALWAYS:
                    $this->checker = new GitHubChecker();
                    break;

                case Checker::DAILY:
                case Checker::WEEKLY:
                case Checker::MONTHLY:
                    $checkFile = $this->getUpdateCheckCacheFile();
                    if ($checkFile === false) {
                        $this->checker = new NoopChecker();
                    } else {
                        $this->checker = new IntervalChecker($checkFile, $interval);
                    }
                    break;

                case Checker::NEVER:
                    $this->checker = new NoopChecker();
                    break;
            }
        }

        return $this->checker;
    }
public function getChecker ( ) { if ( ! isset ( $ this -> checker ) ) { $ interval = $ this -> getUpdateCheck ( ) ; switch ( $ interval ) { case Checker :: ALWAYS : $ this -> checker = new GitHubChecker ( ) ; break ; case Checker :: DAILY : case Checker :: WEEKLY : case Checker :: MONTHLY : $ checkFile = $ this -> getUpdateCheckCacheFile ( ) ; if ( $ checkFile === false ) { $ this -> checker = new NoopChecker ( ) ; } else { $ this -> checker = new IntervalChecker ( $ checkFile , $ interval ) ; } break ; case Checker :: NEVER : $ this -> checker = new NoopChecker ( ) ; break ; } } return $ this -> checker ; }
Get an update checker service instance.

If none has been explicitly defined, this will create a new instance.

@return Checker
Get an update checker service instance .