for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of riesenia/pohoda package.
*
* Licensed under the MIT License
* (c) RIESENIA.com
*/
declare(strict_types=1);
namespace Riesenia\Pohoda\ListRequest;
use Riesenia\Pohoda\AbstractAgenda;
use Riesenia\Pohoda\Common\OptionsResolver;
class Limit extends AbstractAgenda
{
/** @var string[] */
protected array $elements = ['idFrom', 'count'];
* {@inheritdoc}
public function getXML(): \SimpleXMLElement
$xml = $this->createXML()->addChild('ftr:limit', '', $this->namespace('ftr'));
$this->addElements($xml, $this->elements, 'ftr');
return $xml;
}
protected function configureOptions(OptionsResolver $resolver): void
// available options
$resolver->setDefined($this->elements);
// validate / format options
$resolver->setNormalizer('idFrom', $this->normalizerFactory->getClosure('int'));
$resolver->setNormalizer('count', $this->normalizerFactory->getClosure('int'));