/* compiles to e.g.:
//...form...
//Component (form field):
*/
class Component
{
const TAGS =[
'form',
'field',
'captcha',
];
const EXAMPLE = '';
const FRDL_COMPONENT_NAME = '@frdl/dm-captcha/display-auto';
protected $component;
public function __construct($component){
$this->component=$component;
}
protected function e($e){
return sprintf('%s', 'Error: '.$e);
}
public function __invoke(){
if(!$this->component->hasAttribute('webfan-app-key') ){
return $this->e('Attribute webfan-app-key is not set!');
}
if(!$this->component->hasAttribute('fieldname') ){
$fieldname = 'vts_challenge_validation_code';
}else{
$fieldname = $this->component->getAttribute('fieldname');
}
if(!$this->component->hasAttribute('complex') ){
$complex = 50000;
}else{
$complex = intval($this->component->getAttribute('complex'));
}
if(!$this->component->hasAttribute('webfan-api-action') ){
$action = 'action_captcha';
}else{
$action = $this->component->getAttribute('webfan-api-action');
}
if(!$this->component->hasAttribute('invisible') || 'false' === $this->component->getAttribute('invisible') ){
$invisible = ' invisible="false" ';
}else{
$invisible = ' invisible ';
}
return sprintf('',
$this->component->getAttribute('webfan-app-key'),
self::FRDL_COMPONENT_NAME,
$fieldname,
$complex,
$action,
$invisible);
}
}
$module['exports'] = function($component) {
$Component = new Component($component);
return \call_user_func_array($Component, func_get_args());
};__halt_compiler();----SIGNATURE:----l9z8IeFeDe/xFZJKoDrlG5el6+46nfHytkBE7+Y2lcKHuAsSKnns2ycxYltA9y7/8GfYdhVqbBsMnKBXz4PeK+N4G/1zS035LK8aE+bhdxoSBJnhh2Krpy14Bz7B3Da5BGC12dbU4OlIMZJjI5IF+y+tYOQGa5B7bM4cSUHG2aVnUPI412DqIKhw/g4EqreT0QSzTuJ/J+oid8t0DjamTsK8HrGkWIgPYkQRdj+IajS51wfMq9V1mcwdItiGrsas2ADZ4SS92mO7JgiFo2TRjFArny6in1BZnyPu13rbvBbCVldlKQyDgG8teXrHwqRccD5Ms2sG33EzuS6LHA+8eF5LzSc2ZGiIVCC8lyEmQ4nggPgqeyZoY48Bt/CordP+I0Mi40Rn4JBG9qBBFzTARzdRD1FkZak4gOrKWlRi4le1+uy81674s4C0TUPOPpLNLn35VYFWjQTE026lIcR0J7vBi+hJ4gBrVRv2APKJoOPGkuPjionvYEuG2I3vAzOyqA20ZnKRFMyAcepGiMUGqJS/cxHKk68R6PN7exZntazrnfJvUFXvmqjyEz3uZDhy5rj6PSJv+KINawNz4wx7AnEj390ROq2B0lP4wvRUtKqSasNXsaDKasT2Qo9gDY6knbOKcLxKo39IgSS15+NjDLmC/22qwyR6TtA3L7HXwPY=----ATTACHMENT:----MjYwMzg0MzUzNDg5MTA5OSAyMDU4NzM5MDkwNjM3ODI1IDE4NjQwOTc4Njg0NzI4Njc=