@since 0.1

@return bool success
491432
public function logout() {
		$this->logger->log( LogLevel::DEBUG, 'Logging out' );
		$result = $this->postRequest( new SimpleRequest( 'logout' ) );
		if ( $result === [] ) {
			$this->isLoggedIn = false;
			$this->clearTokens();
			return true;
		}
		return false;
	}
298630
protected function isVersioned()
    {
        if (!class_exists(Versioned::class)) {
            return false;
        }
        /** @var Versioned|DataObject $singleton */
        $singleton = DataObject::singleton($this->getBaseClass());
        return $singleton->hasExtension(Versioned::class) && $singleton->hasStages();
    }
544093
public function flush()
    {
        if (empty($this->memcache)) {
            return false;
        }

        $flushStatus = $this->memcache->flush();

        return $flushStatus;
    }
248242
public function accept()
	{
		if( $this->getInnerIterator()->isDot() )
			return FALSE;
		$isDir	= $this->getInnerIterator()->isDir();
		if( !$this->showFolders && $isDir ) 
			return FALSE;
		if( !$this->showFiles && !$isDir ) 
			return FALSE;

		if( $this->stripDotEntries )
		{
			$folderName	= $this->getInnerIterator()->getFilename();
			if( preg_match( "@^\.\w@", $folderName ) )
				return FALSE;
		}
		return TRUE;
	}
60886
public function accept()
	{
		if( $this->getInnerIterator()->isDot() )
			return FALSE;
		if( $this->getInnerIterator()->isDir() )
			return FALSE;

		if( $this->stripDotFiles )
		{
			$fileName	= $this->getInnerIterator()->getFilename();
			if( $fileName[0] == "." )
				return FALSE;
		}
		return TRUE;
	}
991640
protected function hasChange()
	{
		return !( $this->bound1() == $this->model->getRight() || $this->bound1() == $this->model->getLeft() );
	}
394040
public function valid()
	{
		if( $this->next() )
			return TRUE;
		if( is_resource( $this->filePointer ) )
			fclose( $this->filePointer );
		return FALSE;
	}
20527
public function accept()
    {
        if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) {
            return false;
        }

        if ($this->excludedPattern) {
            $path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath();
            $path = str_replace('\\', '/', $path);

            return !preg_match($this->excludedPattern, $path);
        }

        return true;
    }
173567
public function hasChanges()
    {
        if ($this->hasChanges) {
            return $this->hasChanges;
        }

        $this->hasChanges = count($this->newResources) > 0 || count($this->deletedResources) > 0 || count($this->updatedResources) > 0;

        return $this->hasChanges;
    }
1137208
public function isTracking()
	{
		if($this->isTracking === false) {
			return false;
		}

		if(!Resque::redis()->exists((string)$this)) {
			$this->isTracking = false;
			return false;
		}

		$this->isTracking = true;
		return true;
	}
2206
public function release(): bool
    {
        $success = true;
        if (is_resource($this->filePointer)) {
            // FIXME: The lockfile should be unlocked at this point but this will again lead to race conditions,
            // so we need to find out how to do this in a safe way. Keeping the lock files is very inode intensive
            // and should therefore change ASAP.
            if (flock($this->filePointer, LOCK_UN) === false) {
                $success = false;
            }
            fclose($this->filePointer);
        }

        return $success;
    }
879129
protected function hasStty(): bool
	{
		if(static::$hasStty === null)
		{
			exec('stty 2>&1', $output, $status);

			static::$hasStty = $status === 0;
		}

		return static::$hasStty;
	}
142505
public function accept()
	{
		if( $this->isDot() )
			return FALSE;

		$isDir	= $this->isDir();
		if( !$this->showFiles && !$isDir )
			return FALSE;

		if( $this->stripDotEntries )
		{
			if( preg_match( "@^\.\w@", $this->getFilename() ) )
				return FALSE;
			$pathName	= str_replace( "\\", "/", "/".$this->getPath() );
			if( preg_match( "@/\.\w@", $pathName ) )
				return FALSE;
		}

		return preg_match( $this->pattern, $this->getFilename() );
	}
1034211
public function execute()
    {
        if ($this->executed) {
            return true;
        }
      
        $check = $this->checkInputs();
        
        if (!$check) {
            return false;
        }
        
        $request = new Request(Request::POST);
        $request->setHost($this->app->getHost())
            ->setEndpoint(self::ENDPOINT)
            ->setCredentials($this->app->getAppId(), $this->app->getSecretKey());
        
        $result = $request->send(
            [
                "request_id" => $this->requestId,
                "connect_id" => $this->connectId,
                "auth_code" => $this->getParam("code")
            ]
        );
        
        $data = $result->getData();
        
        if (!(isset($data["access_token"]) && isset($data["expiration"]))) {
            throw new EndpointException("Invalid result structure: " . $result->getBody());
        }
        
        $this->accessToken = $data["access_token"];
        $this->accessTokenExpiration = $data["expiration"];
        $this->grantedScope = isset($data["scope"]) ? $data["scope"] : [];
        $this->executed = true;
        
        return true;
    }
1238080
public function execute()
    {
        $success = true;
        foreach ($this->commandList as $command) {
            if (!$this->runSingleCommand($command)) {
                $success = false;
                break;
            }
        }
        return $success;
    }
547982
public function has()
    {
        if (!Request::has('position')) {
            return false;
        }

        if (isset($this->item->position)) {
            return true;
        }

        if (!empty($this->pivot) && isset($this->pivot->position)) {
            return true;
        }

        return false;
    }
656950
public function update()
    {
        if ($this->newVersionAvailable === false
        || (!is_bool($this->newVersionAvailable) && !$this->hasUpdate())) {
            return false;
        }
        $this->backupPhar();
        $this->downloadPhar();
        $this->replacePhar();
        return true;
    }