Çıkış işlemini yapar

@return bool
199402
public function logout()
        {
            $cookie = new Cookie();
            $cookie->delete(static::USER_SESSION);
            $session = new Session();
            $session->delete(static::USER_SESSION);

            return true;
        }
982319
public function validate()
    {
        if (is_numeric($this->categoryId) && $this->categoryId >= 1
                && is_numeric($this->forumId) && $this->forumId >= 1
                && is_numeric($this->threadId) && $this->threadId >= 1
                && !empty($this->threadSlug)) {
            return true;
        }
        return false;
    }
992369
public function valid()
    {
		if ($this->dontUsePaging || !$this->itemCountPerPage)
		{		
			return $this->position >= 0 && $this->position < count($this->getElements());
		}
		if ($this->position < 0) return false;
		if ($this->itemCountPerPage && $this->position >= $this->itemCountPerPage) return false;
		if ($this->getPosition() >= count($this->getElements())) return false;
		return true;
    }
1252398
public function doesImplementPort(): bool
    {
        if ( $this->port === null ) {
            return array_key_exists($this->scheme, self::DEFAULT_PORTS);
        }

        return true;
    }
1244743
public function messages()
    {
        $messages = [];

        // photo message eklenir
        if ( ( $this->has('photo') || $this->file('photo') ) && is_array($this->photo)) {
            foreach ($this->photo as $key => $val) {
                $item = $key + 1;
                $messages['photo.' . $key . '.required'] = "{$item}. Fotoğraf alanı gereklidir.";
                $messages['photo.' . $key . '.elfinder_max'] = "{$item}. Fotoğraf alanı en fazla :size bayt boyutunda olmalıdır.";
                $messages['photo.' . $key . '.elfinder'] = "{$item}. Fotoğraf dosya biçimi :values olmalıdır.";
                $messages['photo.' . $key . '.max'] = "{$item}. Fotoğraf değeri :max kilobayt değerinden küçük olmalıdır.";
                $messages['photo.' . $key . '.image'] = "{$item}. Fotoğraf alanı resim dosyası olmalıdır.";
                $messages['photo.' . $key . '.mimes'] = "{$item}. Fotoğraf dosya biçimi :values olmalıdır.";
            }
        }

        return $messages;
    }
639813
public function sure()
    {
        return !(substr($this->args[0], 0, 4) == 'http'
            || substr($this->args[0], 0, 3) == '../'
            || substr($this->args[0], 0, 3) == '\./'
            || substr($this->args[0], 0, 2) == './'
            || substr($this->args[0], 0, 1) == '/'
        );
    }
54244
public function canEmbed():bool
    {
        return (
            !Craft::$app->getRequest()->getIsAjax() &&
            !Craft::$app->getRequest()->getIsConsoleRequest() &&
            !Craft::$app->getRequest()->getIsCpRequest() &&
            !Craft::$app->getRequest()->getIsLivePreview() &&
            !Craft::$app->getUser()->getIsGuest() &&
            (Craft::$app->getUser()->getIsAdmin() || Craft::$app->getUser()->checkPermission('accessCp'))
        );
    }
911259
public function sure()
    {
        if ($this->hasOption('start')) {
            $this->addOption('doNotSelfQlose');
        }
        if (empty($this->args[0])) {
            $this->args[0] = array();
        }
        switch ($this->called) {
        case 'jquery':
            $this->called = 'script';
            $this->args[0] = array_merge(
                array(
                    'type' => 'text/javascript',
                    'src' => 'https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'
                ),
                $this->args[0]
            );

            return false;
        case 'jqueryui':
            $this->called = 'script';
            $this->args[0] = array_merge(
                array(
                    'type' => 'text/javascript',
                    'src' => 'https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js'
                ),
                $this->args[0]
            );

            return false;
        default:
            $this->called = 'script';
            break;
        }

        if (empty($this->args[0])) {
            return false;
        }

        return is_array($this->args[0])
         || !(substr($this->args[0], 0, 4) == 'http'
         || substr($this->args[0], 0, 3) == '../'
         || substr($this->args[0], 0, 3) == '\./'
         || substr($this->args[0], 0, 2) == './'
         || substr($this->args[0], 0, 1) == '/'
        );
    }
386904
public function ejecutar()
    {
        // Validamos la sentencia a ejecutar
        if (empty($this->sentencia)) {
            if ($this->arrojarExcepciones) {
                throw new \InvalidArgumentException('La sentencia a ejecutar se encuentra vacia.');
            }

            return false;
        }

        // Ejecutamos la sentencia
        $resultado = $this->pdo->exec($this->sentencia);

        if ($resultado === false) {
            if ($this->arrojarExcepciones) {
                $error_info = $this->pdo->errorInfo();
                throw new Excepcion($error_info[2], [
                    'sentencia' => $this->sentencia,
                    'error_codigo' => $error_info[0],
                ], $error_info[1]);
            }

            return false;
        }

        return $resultado;
    }
568126
public static function isSupported()
    {
        if (self::$isSupported === null) {
            self::$isSupported = PHP_VERSION_ID >= 50600 && PHP_INT_SIZE > 4;
        }
        return self::$isSupported;
    }
1179047
public function accept()
	{
		if( $this->isDot() )
			return FALSE;
		$isDir	= $this->isDir();
		if( !$this->showFiles && !$isDir )
			return FALSE;
		if( !$this->showFolders && $isDir )
			return FALSE;
		if( $this->stripDotEntries )
		{
			if( preg_match( "@^\.\w@", $this->getFilename() ) )
				return FALSE;
		}
		return parent::accept();
	}
920093
public function valid()
    {
        if (isset($this->keys[$this->pos])) {
            return $this->offsetExists($this->keys[$this->pos]);
        }
        return false;
    }
183855
public function validateStatusApi(): bool
    {
        /** @var AbstractUser $user */
        $user = $this->getUser();
        if ($user && $user->status_id === AbstractUser::STATUS_BLOCKED) {
            throw new InvalidArgumentException(\Yii::t('app', 'Ваш аккаунт заблокирован. Обратитесь к тех.поддержке.'));
        }
        if ($user && $user->status_id === AbstractUser::STATUS_WAIT_EMAIL) {
            throw new InvalidArgumentException(\Yii::t('app', 'Ваш аккаунт не подтвержден. Необходимо подтвердить e-mail.'));
        }
        return true;
    }
959458
public function valid() {
    if (isset($this->resources[$this->position])) {
      return true;
    }
    $this->preloadPage();
    return isset($this->resources[$this->position]);
  }
887540
public function check($file = '')
        {
            $types = $this->getAllowedMimeTypes();
            if ($types === '*') {
                return true;
            }

            // dosyanın tipini alıyoruz
            $fileMimeType = $this->getFileMimeType();
            foreach($types as $type)
            {
                 if($type === $fileMimeType){
                     return true;
                 }else{
                     continue;
                 }
            }

            return false;
        }
669876
public function hasPhpConfigIssue()
    {
        foreach ($this->requirements as $req) {
            if (!$req->isFulfilled() && $req instanceof PhpConfigRequirement) {
                return true;
            }
        }

        return false;
    }
265677
public function canEdit()
    {
        if($this->getMixer() instanceof KControllerModellable)
        {
            $user = $this->getUser();
            if ($user->isAuthentic() && $user->isEnabled()) {
                return true;
            }
        }

        return false;
    }