Whether FullText index is available or not and should be used.

@return bool True if enabled and should be used, false otherwise
172482
protected function _isFullTextEnabled()
    {
        if (!$this->config('fulltext')) {
            return false;
        }

        static $enabled = null;
        if ($enabled !== null) {
            return $enabled;
        }

        list(, $driverClass) = namespaceSplit(strtolower(get_class($this->_table->connection()->driver())));
        if ($driverClass != 'mysql') {
            $enabled = false;

            return false;
        }

        $schema = $this->_table->SearchDatasets->schema();
        foreach ($schema->indexes() as $index) {
            $info = $schema->index($index);
            if (in_array('words', $info['columns']) &&
                strtolower($info['type']) == 'fulltext'
            ) {
                $enabled = true;

                return true;
            }
        }

        $enabled = false;

        return false;
    }
414117
public function isWritable()
    {
        if (null !== ($uri = $this->getMetadata('uri'))) {
            if (is_writable($uri)) {
                return true;
            } elseif (null !== ($mode = $this->getMetadata('mode'))) {
                preg_match_all('/[a-z]\D?/', $mode, $matches);

                if (isset($matches[ 0 ])) {
                    foreach ($matches[ 0 ] as $match) {
                        if (in_array($match, ['r+', 'w', 'w+', 'a', 'a+', 'x', 'x+', 'c', 'c+'])) {
                            return true;

                            break;
                        }
                    }
                }
            }
        }

        return false;
    }
554925
public function is_editing_the_frontpage() {
        // There are some conditions to check related to contexts.
        $ctxconditions = $this->page->context->contextlevel == CONTEXT_COURSE &&
            $this->page->context->instanceid == get_site()->id;
        $issiteindex = (strpos($this->page->pagetype, 'site-index') === 0);
        // So now we can be 100% sure if edition is happening at frontpage.
        return ($ctxconditions && $issiteindex);
    }
1368326
protected static function isEnabled()
    {
        if ( self::$isEnabled === null )
        {
            $ini = eZINI::instance();
            $useTextTranslation = $ini->variable( 'RegionalSettings', 'TextTranslation' ) != 'disabled';
            self::$isEnabled = $useTextTranslation || eZTranslatorManager::dynamicTranslationsEnabled();
        }
        return self::$isEnabled;
    }
120644
private function hasFullAccess(): bool
    {
        if (! isset($this->capabilities['action'][Utils::getTypeFull()])) {
            return false;
        }

        // check user capabilities against action's full capabilities
        foreach ($this->capabilities['action'][Utils::getTypeFull()] as $capability) {
            // if current action's full capability is matched in user's capabilities just return
            if (in_array($capability->getName(), $this->capabilities['user'])) {
                return true;
            }
        }

        return false;
    }
390373
public function isReadable() {

		if(false !== $this -> directory -> getExists()) {

			$this -> refresh();
			
			return $this -> directory -> getReadable();
		}

		return false;
	}
887668
public function isWritable()
    {
        if ($this->writable === null) {
            $this->writable = false;
            if ($this->isAttached()) {
                foreach (self::$modes['writable'] as $mode) {
                    if (strpos($this->meta['mode'], $mode) === 0) {
                        $this->writable = true;
                        break;
                    }
                }
            }
        }

        return $this->writable;
    }
755248
public function isHintEnabled()
    {
        $isParamPresent = $this->_request->getParam('ath', false) === '1';

        if ($isParamPresent) {
            $applicationMode = $this->appState->getMode();
            $storeId = $this->storeManager->getStore()->getId();

            if ($applicationMode === AppState::MODE_DEVELOPER || $this->developerHelper->isDevAllowed($storeId)) {
                return true;
            }
        }

        return false;
    }
472858
private function hasIndex($index)
    {
        return is_string($index) ? $this->hasName($index) : $this->hasPosition($index);
    }
949453
public function can_delete_full() {
        global $DB;
        if (!$this->id) {
            // Fool-proof.
            return false;
        }

        $context = $this->get_context();
        if (!$this->is_uservisible() ||
                !has_capability('moodle/category:manage', $context)) {
            return false;
        }

        // Check all child categories (not only direct children).
        $sql = context_helper::get_preload_record_columns_sql('ctx');
        $childcategories = $DB->get_records_sql('SELECT c.id, c.visible, '. $sql.
            ' FROM {context} ctx '.
            ' JOIN {course_categories} c ON c.id = ctx.instanceid'.
            ' WHERE ctx.path like ? AND ctx.contextlevel = ?',
                array($context->path. '/%', CONTEXT_COURSECAT));
        foreach ($childcategories as $childcat) {
            context_helper::preload_from_record($childcat);
            $childcontext = context_coursecat::instance($childcat->id);
            if ((!$childcat->visible && !has_capability('moodle/category:viewhiddencategories', $childcontext)) ||
                    !has_capability('moodle/category:manage', $childcontext)) {
                return false;
            }
        }

        // Check courses.
        $sql = context_helper::get_preload_record_columns_sql('ctx');
        $coursescontexts = $DB->get_records_sql('SELECT ctx.instanceid AS courseid, '.
                    $sql. ' FROM {context} ctx '.
                    'WHERE ctx.path like :pathmask and ctx.contextlevel = :courselevel',
                array('pathmask' => $context->path. '/%',
                    'courselevel' => CONTEXT_COURSE));
        foreach ($coursescontexts as $ctxrecord) {
            context_helper::preload_from_record($ctxrecord);
            if (!can_delete_course($ctxrecord->courseid)) {
                return false;
            }
        }

        return true;
    }
1046562
public function actionIndex()
    {
        $app = Yii::$app;

        if ($app->getRequest()->getIsAjax()) {
            return false;
        }

        return $this->render($app->maintenanceMode->viewPath, [
            'title' => $app->maintenanceMode->title,
            'message' => $app->maintenanceMode->message
        ]);
    }
762541
public static function checkBrowserYandex()
    {
        if (stripos(self::$userAgentString, 'YaBrowser') !== false) {
            $aresult = explode('/', stristr(self::$userAgentString, 'YaBrowser'));
            if (isset($aresult[1])) {
                $aversion = explode(' ', $aresult[1]);
                self::$browser->setVersion($aversion[0]);
            }
            self::$browser->setName(Browser::YANDEX);

            return true;
        }

        return false;
    }
101322
public static function isTablet(){
		self::setHttpHeaders();
		$userAgent=isset(self::$httpHeaders['HTTP_USER_AGENT'])?self::$httpHeaders['HTTP_USER_AGENT']:'';
		if(empty($userAgent))
			return false;
		foreach(self::$tabletDevices as $_regex)
			if(self::match($_regex, $userAgent))
				return true;
		return false;
		}
148396
private function isSelectable(Content $content): bool
    {
        if (!$this->config->hasParameter('allowed_content_types')) {
            return true;
        }

        if ($this->allowedContentTypeIds === null) {
            $this->allowedContentTypeIds = [];

            $allowedContentTypes = $this->config->getParameter('allowed_content_types');
            if (is_string($allowedContentTypes) && $allowedContentTypes !== '') {
                $allowedContentTypes = array_map('trim', explode(',', $allowedContentTypes));
                $this->allowedContentTypeIds = $this->getContentTypeIds($allowedContentTypes);
            }
        }

        if (count($this->allowedContentTypeIds) === 0) {
            return true;
        }

        return in_array($content->contentInfo->contentTypeId, $this->allowedContentTypeIds, true);
    }
38154
public function index()
    {
        if ($this->isEmpty()) {
            return false;
        }

        $params = array();

        foreach ($this->all() as $item) {
            $params['body'][] = array(
                'index' => array(
                    '_index' => $item->getIndex(),
                    '_type' => $item->getTypeName(),
                    '_id' => $item->getKey()
                )
            );

            $params['body'][] = $item->documentFields();
        }

        return $this->getElasticClient()->bulk($params);
    }
1001341
public function hasNext() {
        if (!isset($this->current)) {
            throw new BadMethodCallException('You need to call method "load()" first.');
        }

        for ($ipLong = $this->current; $ipLong <= $this->last; $ipLong++) {
            if ($this->isUsed($ipLong) === false) {
                return true;
            }
        }

        return false;
    }
1095154
public function isIndexed()
    {
        $fields = $this->getFieldsInQuery();
        foreach ($fields as $field) {
            if ( ! $this->collection->isFieldIndexed($field)) {
                return false;
            }
        }
        return true;
    }