Random Blocker, Set Banner-ID

@param integer    $BannerID
551574
protected function setRandomBlockerId($BannerID=0)
	{
	    if ($BannerID==0) { return; }// kein Banner, nichts zu tun
	    
	    $this->statusRandomBlocker = true;
	    $this->setSession('RandomBlocker'.$this->module_id , array( $BannerID => time() ));
	    return ;
	}
705856
public function setLayoutId( $layoutId )
    {
        $this->_layout  = null;
        $this->layoutId = ( (int) $layoutId ) ?: null;
        return $this;
    }
698917
public function setId( $id )
	{
		if( $id === $this->getId() ) { return; }

		$this->_values['id'] = (string) $id ;
		$this->setModified();
	}
819246
protected function setIds($id)
    {
        if ($id) {
            $this->props = $this->mergeProps(array(
                $this->props,
                array(
                    'attribsContainer' => array(
                        'id' => $id.'_container',
                    ),
                    'attribs' => array(
                        'id' => $id,
                    ),
                    'attribsLabel' => array(
                        'for' => $id,
                    ),
                    'attribsHelpBlock' => array(
                        'id' => $id.'_help_block',
                    ),
                ),
            ));
        }
    }
1123820
public function setApplicationId($objectOrId)
    {
        if ($objectOrId instanceof Application) {
            $objectOrId = $objectOrId->getId();
        }

        $this->setValue('application', (string) $objectOrId);
    }
222857
public function setWingId($wingId)
    {

        if (!is_null($wingId) && ($wingId < 0)) {
            throw new \InvalidArgumentException('invalid value for $wingId when calling PutFleetsFleetIdMembersMemberIdMovement., must be bigger than or equal to 0.');
        }

        $this->container['wingId'] = $wingId;

        return $this;
    }
844674
private function setSubject($blockId): BaseBlock
    {
        /** @var BaseBlock $block */
        $block = $this->admin->getObject($blockId);
        if (!$block) {
            throw $this->createNotFoundException(sprintf('Unable to find block with id %d', $blockId));
        }
        $this->admin->setSubject($block);

        return $block;
    }
768851
public function init($pageId)
    {
        if (!$this->layoutSetup instanceof LayoutSetup) {
            $this->injectLayoutSetup(GeneralUtility::makeInstance(LayoutSetup::class)->init($pageId));
        }
    }
910395
public function onSuccess(BannerInterface $banner)
    {
        $alert = $this->alertManager->create();

        $alert->addSuccess($this->translator->trans('success.save_banner', array(), 'SilvestraBanner'));
        $this->alertManager->setFlashAlert($alert);

        return new RedirectResponse($this->router->generate(
            'silvestra_banner.banner_list',
            array('zoneId' => $banner->getZone()->getId())
        ));
    }
1137522
public function setId($id = null)
    {
        if ($id == null) {
            $this->id = mt_rand(0, 255);
        } else {
            $this->id = (int)$id;
        }

        return $this;
    }
1131986
public static function setupServerId(string $serverId)
    {
        //====================================================================//
        // Setup Local Splash Module for Current Server
        /** @var Local $local */
        $local = Splash::local();
        $local->setServerId($serverId);
        //====================================================================//
        // Reboot Splash Core Module
        Splash::reboot();
    }
1374686
protected function setFirstViewBlockerId($banner_categorie=0)
	{
	    if ($banner_categorie==0) { return; }// keine Banner Kategorie, nichts zu tun
	     
	    $this->statusFirstViewBlocker = true;
	    $this->setSession('FirstViewBlocker'.$this->module_id, array( $banner_categorie => time() ));
	    return ;
	}
159829
private function add_flag_to_message($messageid, $flag) {
        // Get the current mailbox.
        $mailbox = $this->get_mailbox();

        // Mark it as read to lock the message.
        $this->client->store($mailbox, array(
            'ids' => new \Horde_Imap_Client_Ids($messageid),
            'add' => $flag,
        ));
    }
1065727
protected function getStatViewUpdateBlockerId($banner_id=0)
	{
	    $this->getSession('StatViewUpdateBlocker'.$this->module_id);
	    if ( count($this->_session) )
	    {
	        reset($this->_session);
	        foreach ($this->_session as $key => $val)
	        {
	            if ( $key == $banner_id && 
	                 $this->removeStatViewUpdateBlockerId($key, $val) === true )
	            {
	                // Key ist noch gültig und es muss daher geblockt werden
	                //DEBUG log_message('getStatViewUpdateBlockerId Banner ID:'.$key,'Banner.log');
	                return true;
	            }
	        }
	    }
	    return false;
	}
459490
public function setDocumentId($documentId)
    {
        if (preg_match($this->getDocumentIdRegex(), $documentId)) {
            $this->document_id = $documentId;

            return $this;
        }

        throw new InvalidArgument(
            'document_id must be a string with 10 alphanumeric letters.' .
                     '5 letters, followed by 4 numbers, followed by 1 letter or number. Example: ABCDE1234F'
        );
    }
1213134
def set_block(fd):
    """"""
    flags = fcntl.fcntl(fd, fcntl.F_GETFL)
    fcntl.fcntl(fd, fcntl.F_SETFL, flags & ~os.O_NONBLOCK)
1089195
private function getBannerZoneOr404($bannerZoneId)
    {
        $bannerZone = $this->bannerZoneManager->findById($bannerZoneId);

        if (null === $bannerZone) {
            throw new NotFoundHttpException(sprintf('Not found %s banner zone', $bannerZoneId));
        }

        return $bannerZone;
    }