Flush the current (valid) code buffer.

If the code buffer is valid, resets the code buffer and returns the
current code.

@return string PHP code buffer contents
193401
public function flushCode()
    {
        if ($this->hasValidCode()) {
            $this->addCodeBufferToHistory();
            $code = $this->code;
            $this->popCodeStack();

            return $code;
        }
    }
1016396
public function flush()
    {
        $flushCallback = function ($allFlushed, $cache) {
            return $allFlushed && $cache->flush();
        };
        return array_reduce($this->caches, $flushCallback, true);
    }
450198
public function flush()
    {
        $script = "
		local entries = redis.call('LRANGE',KEYS[1],0,-1)
		for k1,entryIdentifier in ipairs(entries) do
			redis.call('DEL', ARGV[1]..'entry:'..entryIdentifier)
			local tags = redis.call('SMEMBERS', ARGV[1]..'tags:'..entryIdentifier)
			for k2,tagName in ipairs(tags) do
				redis.call('DEL', ARGV[1]..'tag:'..tagName)
			end
			redis.call('DEL', ARGV[1]..'tags:'..entryIdentifier)
		end
		redis.call('DEL', KEYS[1])
		redis.call('DEL', KEYS[2])
		";
        $this->redis->eval($script, [$this->buildKey('entries'), $this->buildKey('frozen'), $this->buildKey('')], 2);

        $this->frozen = null;
    }
1322929
public function stream_flush()
    {
        if (!$this->getResource()) {
            return false;
        }

        $buffer = $this->getDataBuffer();
        $bufferWritten = $buffer;
        $retVal = true;
        if (!empty($buffer)) {

            $object = $this->getResource()->getObject();
            $mimetype = $this->getService()->guessFileType($this->getResource()->getResourceName());
            $object->content_type = $mimetype;
            $object->setData($buffer);
            $object->Create();
        }

       if (strlen($bufferWritten) ==  strlen($buffer)) {
            $this->setDataBuffer(null);
        } else {
            $this->setDataBuffer($buffer);
        }
        $this->setDataBuffer(null);

        return $retVal;
    }
5699
public function stream_flush()
    {
        if ($this->fileHandle === null) {
            return false;
        }
        self::restore();
        $success = fflush($this->fileHandle);
        self::register();
        return $success;
    }
627420
public function tearDown()
    {
        // Get and clean output buffer.
        $buffer = ob_get_clean();

        // Pop lastest cache key.
        $key = array_pop($this->keys);

        // Put output buffer content, if
        // we don't have cached value.
        if (! $this->cached) {
            $this->cache->put($key, $buffer, $this->getArgument('expire'));

            return $buffer;
        }

        // Return cache value.
        return $this->cache->get($key);
    }
408527
public function flush()
	{
		$this->where = null;
		$this->_aSelect = array();
		$this->_sFrom = '';
		$this->_sFromAs = '';
		$this->_aJoin = array();
		$this->_sUpdate = '';
		$this->_mWhere = array();
		$this->_aSet = array();
		$this->_sInsertInto = '';
		$this->_aValues = array();
		$this->_sDelete = '';
		$this->_aOrderBy = array();
		$this->_aGroupBy = array();
		$this->_iLimit = null;
		return $this;
	}
638817
public function getPersistCode()
	{
		$this->persist_code = $this->getRandomString();

		// Our code got hashed
		$persistCode = $this->persist_code;

		$this->save();

		return $persistCode;
	}
645165
public function getExitCode()
    {
        if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) {
            throw new RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.');
        }

        $this->updateStatus(false);

        return $this->exitcode;
    }
619963
def __flush_buffer(self):
        
        def ok(_):
            self._buffer.close()
            self._buffer = StringIO()
        return self.__flush_data(self._buffer.getvalue()).addCallback(ok)
359617
public static function flush()
    {
        $instance = self::getInstance();
        $glob = @glob(self::cacheDir() . $instance->_options['file_name_prefix'] . '--*');

        if (empty($glob)) {
            return false;
        }

        foreach ($glob as $v) {
            $fileName = basename($v);
            $id = $instance->_fileNameToId($fileName);
            $instance->delete($id);
        }
        return true;
    }
324528
public function flush()
    {
        $i = 0;
        $count = $this->count();

        while ($i < $count) {
            if (xcache_clear_cache(XC_TYPE_VAR, $i) === false) {
                return false;
            }

            $i++;
        }

        return true;
    }
1004017
public function flush()
    {
        /** @var Cache $cache */
        $cache = $this->app['phraseanet.cache-service'];
        $flushOK = $cache->flushAll() ? 'ok' : 'ko';

        return $this->app->redirectPath('admin_dashboard', ['flush_cache' => $flushOK]);
    }
773277
public function flush()
    {
        if (!count($this->updated)) {
            // Not updated words
            return;
        }

        foreach ($this->updated as $lang => $true) {
            // Grouping all words by language
            $words = array();

            foreach ($this->words as $word => $wordLanguages) {
                if (in_array($lang, $wordLanguages)) {
                    $words[] = $word;
                }
            }

            $file = $this->dictionaryDir . '/' . $lang . '.php';
            file_put_contents($file, '<?php return ' . var_export($words, 1) . ';');
        }
    }
1050983
public function flush() {

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

			if(false === is_writable($this -> file -> getBasepath())) {
				return trigger_error(sprintf('File "%s" passed to %s() is not writable', $this -> file -> getBasepath(), __METHOD__), E_USER_ERROR);
	    	}

			$fh = fopen($this -> file -> getBasepath(), 'w');
			
			if(flock($fh, LOCK_EX)) {

    			ftruncate($fh, 0);
			    fflush($fh);
    			flock($fh, LOCK_UN);
    		}

			fclose($fh);

			$this -> refresh();
		}

		return $this;
	}
964910
protected function getCode() {
    if (isset($_REQUEST['code'])) {
      if ($this->state !== null &&
          isset($_REQUEST['state']) &&
          $this->state === $_REQUEST['state']) {

        // CSRF state has done its job, so clear it
        $this->state = null;
        $this->clearPersistentData('state');
        return $_REQUEST['code'];
      } else {
        self::errorLog('CSRF state token does not match one provided.');
        return false;
      }
    }

    return false;
  }
183055
def __flush_buffer(self):
        
        self.__flush_data(self._buffer.getvalue())
        self._buffer.close()
        self._buffer = StringIO()