Generate and write feed content to handle

@param resource $targetHandle
@return $this
@throws FeedException
@throws LockException
8194
public function generateFeed($targetHandle)
    {
        $this->executeLocked(function () use ($targetHandle) {
            $this->writer->write($targetHandle);
            $this->touchFeedGenerateDate();
        });
        return $this;
    }
132258
public function update($reactionId, array $data=null, array $targetFeeds=null)
    {
        $payload = [];
        if( $data !== null ){
            $payload['data'] = $data;
        }
        if( $targetFeeds !== null ){
            $payload['target_feeds'] = $targetFeeds;
        }
        $response = $this->doRequest('PUT', 'reaction/' . $reactionId . '/', $payload);
        $body = $response->getBody()->getContents();
        return json_decode($body, true);
    }
627609
protected function newHookableListener($sourceEvent, $targetEventName)
    {
        return function () use ($sourceEvent, $targetEventName) {
            $args = func_get_args();
            $targetEventName = $this->buildTargetEventName($sourceEvent, $targetEventName);
            return $this->target->fire($targetEventName, $args);
        };
    }
401623
protected function createHandle(){

		if(!empty($this->stack)){
			$url = array_shift($this->stack);

			if($url instanceof URL){
				$curl = curl_init($url->mergeParams());

				curl_setopt_array($curl, $this->curl_options);
				curl_multi_add_handle($this->curl_multi, $curl);

				if($this->options->sleep){
					usleep($this->options->sleep);
				}

			}
			else{
				// retry on next if we don't get what we expect
				$this->createHandle(); // @codeCoverageIgnore
			}

		}

	}
981892
public function download($url, $target, $callback = null)
    {
        if (!$this->filesystem->fileExists($target)) {
            $this->filesystem->dirCreate(dir($target));

            $request = new Request($url, $callback ?: function ($response) {
            });

            $request->options['file'] = $target;

            $this->add($request);
        }

        return $this;
    }
341815
public function handle(Parser $parser, \DOMNode $node, NodeInterface $target)
    {
        $url = $node->attributes->getNamedItem('href')->nodeValue;
        $type = $node->attributes->getNamedItem('type')->nodeValue;
        $length = intval($node->attributes->getNamedItem('length')->nodeValue, 10);
        $title = $node->attributes->getNamedItem('title') ? $node->attributes->getNamedItem('title')->nodeValue : basename($url);
        $enclosure = new Enclosure();
        $enclosure
            ->setType($type)
            ->setLength($length)
            ->setTitle($title)
            ->setUrl($url);
        /** @var ItemInterface $target */
        $target->addEnclosure($enclosure);
    }
1163091
public function fillObjectWithRawData($targetObject, stdClass $rawData)
	{
		$this->filler->fillObjectWithRawData($targetObject, $rawData);

		return $targetObject;
	}
988816
public static function head($path, $handlerMethod = null)
    {
        return self::factory($path, HttpMethods::HEAD, $handlerMethod);
    }
241713
public function createManyToManySelector(
        IObject $object,
        ManyToManyRelationField $manyToManyRelationField,
        ICollection $targetCollection
    )
    {
        $manyToManyObjectSet = $this->objectSetFactory->createManyToManyObjectSet($object, $manyToManyRelationField);

        return $this->getSelectorInstance($targetCollection, $manyToManyObjectSet);
    }
240145
public function write($data)
    {
        if ($this->_handle === null) {
            throw new PHPRtfLite_Exception('Can not write on an undefined handle! Forgot to call open()?');
        }
        fwrite($this->_handle, $data);
    }
424506
public function initializeObject()
    {
        foreach ($this->options as $key => $value) {
            $isOptionSet = $this->setOption($key, $value);
            if (!$isOptionSet) {
                throw new TargetException(sprintf('An unknown option "%s" was specified in the configuration of a resource FileSystemTarget. Please check your settings.', $key), 1361525952);
            }
        }

        if (!is_writable($this->path)) {
            @Files::createDirectoryRecursively($this->path);
        }
        if (!is_dir($this->path) && !is_link($this->path)) {
            throw new TargetException('The directory "' . $this->path . '" which was configured as a publishing target does not exist and could not be created.', 1207124538);
        }
        if (!is_writable($this->path)) {
            throw new TargetException('The directory "' . $this->path . '" which was configured as a publishing target is not writable.', 1207124546);
        }
    }
55718
public function setTargetLanguage($targetLanguage): void
    {
        if (!preg_match('#[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*#', $targetLanguage)) {
            throw new \InvalidArgumentException('Invalid language string: "' . $targetLanguage . '"');
        }
        $this->getFileElement()->setAttributeNS(static::XLIFF_NS, 'target-language', $targetLanguage);
    }
140943
public function handle(Parser $parser, \DOMNode $node, NodeInterface $target)
    {
        $item = new FeedItem();
        $parser->parseNodeChildren($node, $item);
        /** @var FeedInterface $target */
        $target->addItem($item);
    }
260216
protected function createHandle()
    {
        $curl = $this->handles ? \array_pop($this->handles) : \curl_init();
        if (false === $curl) {
            throw new ClientException('Unable to create a new cURL handle');
        }

        return $curl;
    }
141876
public function generate(array $requests, ParametersManager $parManager)
    {
        $temReqs = TemplateRequest::filter($requests);
        foreach ($temReqs as $request) {
            $request->setContent($this->processTemplate($request->getContent(), $requests));
            if ($request->getType() === TemplateRequest::INCLUDED) {
                $this->create('src/Resources/views/', $request->getId().'.php', $request->getContent());
            }
        }
    }
875798
def update_handler(feeds):
		''''''
		# Check if this call is a result of actions initiated from
		#  one of the hooks in a higher frame (resulting in recursion).
		if Feed._filters_update_handler_lock: return
		return Feed._filters_update_handler(Feed, feeds, force=True)
471049
public function renderFile($content, $targetPath, array $options)
    {
        $options = $this->transformOptions($options);
        $pdfGenerator = $this->createPdfGenerator();

        $pdfGenerator->renderFileFromHtml(
            $content,
            $targetPath,
            $options
        );
    }