Stop the current section block.

@return null
4235
public function stop()
    {
        if (is_null($this->sectionName)) {
            throw new LogicException(
                'You must start a section before you can stop it.'
            );
        }

        $content = ob_get_clean();

        if ($this->appendSection && isset($this->sections[$this->sectionName])) {
            $this->sections[$this->sectionName] = $this->sections[$this->sectionName] .ob_get_clean();
        } elseif ($this->prependSection && isset($this->sections[$this->sectionName])) {
            $this->sections[$this->sectionName] = ob_get_clean() . $this->sections[$this->sectionName];
        } else {
            $this->sections[$this->sectionName] = $content;
        }

        $this->sectionName = null;
        $this->appendSection  = false;
        $this->prependSection = false;
    }
941767
public function stop()
    {
        // Try to emit onWorkerStop callback.
        if ($this->onWorkerStop) {
            try {
                call_user_func($this->onWorkerStop, $this);
            } catch (\Exception $e) {
                self::log($e);
                exit(250);
            } catch (\Error $e) {
                self::log($e);
                exit(250);
            }
        }
        // Remove listener for server socket.
        if ($this->_mainSocket) {
            self::$globalEvent->del($this->_mainSocket, EventInterface::EV_READ);
            @fclose($this->_mainSocket);
        }
    }
505607
public function stopBlock($name = null)
    {
        if (empty($this->currentBlockName)) {
            throw new InvalidParamException(
                "Unexpected stopBlock in '{$this->processingViewFile}'"
            );
        }
        if (!empty($name) && $this->currentBlockName != $name) {
            throw new InvalidParamException(
                "Expected current closed block name '{$this->currentBlockName}' instead of '{$name}'"
              . " in '{$this->processingViewFile}'"
            );
        }
        $name = $this->currentBlockName;

        $fullBlockName = $this->getCurrentBlockFullName();

        array_pop(static::$_blocksStack);

        $content = ob_get_clean();

        // save every block of every view-file in inherit chain (not only for last) - it will need for render parentBlock
        if (!$this->viewBlocks($this->processingViewFile)->exists($fullBlockName)) {
            $this->viewBlocks($this->processingViewFile)->add($fullBlockName, $content);
        }

        $savedContent = $this->findProperBlock($fullBlockName, $this->processingViewFile);
        if ($savedContent !== false) {
            $content = $savedContent; // rewrite
        }
        if ($savedContent !== false && empty($this->_extendingParent[$this->processingViewFile])) {
            // such block already saved - replace block in parent view-template by saved content
            $n = $this->hasParentBlock($savedContent);
            while ($n--) {
                $savedContent = $this->replaceParentBlock($savedContent);
            }
            echo $savedContent;
        } else {
            echo $content; // always echo - to catch by outer block
        }
    }
927909
public function stop()
	{
		// do we need to rotate?
		if ($this->rotationInterval and $this->rotationTimer < time())
		{
			$this->rotate();
		}

		// stop the current session
		return $this->driver->stop();
	}
1019990
public function stopSentence()
  {
    $url = new URIResource($this->getAudioUrl());
    $data = new DataPacket(array("sentence" => ""));

    $this->client->post($url, $data->get());
  }
1270882
protected function end()
    {
        // stop recording block
        $content = ob_get_clean();

        // read record
        list($name, $rewrite) = $this->record;

        // rewrite
        if($rewrite) {
            $this->blocks += [$name => $content];
        }
        // render
        else {
            echo isset($this->blocks[$name])
                ? $this->blocks[$name]
                : $content;
        }

        // reset record
        $this->record = null;
    }
1215638
public function pop(){
		if(count($this->stack) > $this->depth) array_pop($this->stack);
		if($this->depth==0) throw new \Exception('Can\' pop nothing');
		$this->depth--;
		
		if($this->current != null){
			$this->current	= $this->current->getParent();
			$this->loaded	= $this->current != null;
		}
	}
1345352
public function stop()
    {
        if ($this->stopped) {
            return;
        }
        $this->stopped = true;
        if (in_array('one-by-one', $this->pollMode)) {
            $this->finish();
            return;
        }
        $this->appInstance->unsubscribeReal('s2c:' . $this->sessId, function ($redis) {
            $this->finish();
        });
    }
80197
public function stop()
    {
        $success = false;

        if ($this->pid > 0) {
            posix_kill($this->pid, 9);
            pcntl_waitpid($this->pid, $temp = 0, WNOHANG);

            $success = pcntl_wifexited($temp);

            $this->cleanThreadContext();
        }

        return $success;
    }
920222
public function setSection( Section$section=null ):self
	{
		if( !$section ){
			$this->sectionLevel= 0;
			$this->currentSection= null;

			return $this;
		}

		if( $this->currentSection ){
			$this->throw('Nesting definition of section is forbidden.');
		}

		if( isset($this->parent->sections[$section->name]) ){
			$this->throw("Section {$section->name} already defined.");
		}

		$this->currentSection= $section;

		if( $section->name ){
			$this->parent->sections[$section->name]=$section;
		}

		$this->sectionLevel= $this->level+1;

		return $this;
	}
764232
public function stop()
    {
        if (null === $this->sessionId) {
            throw new Exception("Session not started");
        }

        $this->doExecute('testComplete');
        $this->sessionId = null;
    }
227720
private static function _stop()
  {
    $adapter = self::$_transaction->_stored;
    
    if (is_null($adapter)) {
      Config::clearDataAdapter();
    } else {
      Config::setDataAdapter($adapter);
    }
  }
1198265
public function stop() {
        if (empty($this->sections)) {
            throw new Exception(
                __('You must start a section before you can stop it.')
            );
        }
        end($this->sections);
        $this->sections[key($this->sections)] = ob_get_clean();
    }
315056
public function endsection()
    {
        $section = $this->getLastSection();
        $section->stop();

        if ($this->hasParent()) {
            return;
        }

        $content = $section->getContent(0);
        $section->reset();

        return $content;
    }
710919
@Override
   public final void stop() {
      // Trying to stop() from FAILED is valid, but may not work
      boolean failed;

      synchronized (this) {
         try {
            while (state == ComponentStatus.STOPPING) {
               wait();
            }
            if (!state.stopAllowed()) {
               getLog().debugf("Ignoring call to stop() as current state is %s", state);
               return;
            }

            failed = state == ComponentStatus.FAILED;
            state = ComponentStatus.STOPPING;
         } catch (InterruptedException e) {
            throw new CacheException("Interrupted waiting for the component registry to stop");
         }
      }

      preStop();

      try {
         internalStop();

         postStop();
      } catch (Throwable t) {
         if (failed) {
            getLog().failedToCallStopAfterFailure(t);
         } else {
            handleLifecycleTransitionFailure(t);
         }
      } finally {
         synchronized (this) {
            state = ComponentStatus.TERMINATED;
         }
      }
   }
749098
public function stopParent()
    {
        if (!empty($this->currentBlockName)) {
            throw new InvalidParamException("Unclosed startBlock detected in '{$this->processingViewFile}'");
        }
        if (empty($this->_extendingParent[$this->processingViewFile])) {
            throw new InvalidParamException("stopParent unexpected here without startParent in '{$this->processingViewFile}'");
        }
        $this->_extendingParent[$this->processingViewFile] = false;

        $lost = ob_get_clean(); // lost all non-block info between startParent...stopParent
        
        // render parent view with blocks inclusions
        $parentFile = $this->findParentViewFile($this->processingViewFile);
        if ($parentFile) {
            $this->_currentViewFile[$this->viewFile] = $parentFile;

            $parentDataFile = $this->viewFile;
            $params = empty($this->_viewsParams[$parentDataFile]) ? [] : $this->_viewsParams[$parentDataFile];
            if (!empty($this->_addParentData[$parentDataFile])) {
                $addParentData = $this->_addParentData[$parentDataFile];
                $params = ArrayHelper::merge($params, $addParentData);
            }
            $result = $this->renderPhpFile($parentFile, $params);
            $n = $this->hasParentBlock($result);
            while ($n--) {
                $result = $this->replaceParentBlock($result);
            }
            if ($this->hasParentBlock($result)) {
                throw new InvalidParamException("Unprocessed nested parentBlock found in '{$this->processingViewFile}'");
            }            
            echo $result;
        }
    }
480170
public function stop()
    {

        // load the queue keys
        $queues = get_object_vars($this->getQueues());

        // iterate over the queues and shut them down
        /** @var AppserverIo\Psr\Pms\QueueInterface $queue */
        foreach ($queues as $queue) {
            $queue->stop();
        }
    }