コード例 #1
0
 /**
  * @param string         $Name
  * @param null|string    $Placeholder
  * @param null|string    $Label
  * @param IIconInterface $Icon
  */
 public function __construct($Name, $Placeholder = '', $Label = '', IIconInterface $Icon = null)
 {
     $this->Name = $Name;
     $this->Template = $this->getTemplate(__DIR__ . '/TextCaptcha.twig');
     $this->Template->setVariable('ElementName', $Name);
     $this->Template->setVariable('ElementLabel', $Label);
     $this->Template->setVariable('ElementPlaceholder', $Placeholder);
     if (null !== $Icon) {
         $this->Template->setVariable('ElementIcon', $Icon);
     }
     $this->Template->setVariable('ElementSource', Captcha::getCaptcha()->createCaptcha()->getCaptcha());
 }
コード例 #2
0
ファイル: index.php プロジェクト: BozzaCoon/SPHERE-Framework
use MOC\V\Core\AutoLoader\AutoLoader;
/**
 * Setup: Php
 */
header('Content-type: text/html; charset=utf-8');
error_reporting(E_ALL);
ini_set('display_errors', 1);
session_start();
session_write_close();
date_default_timezone_set('Europe/Berlin');
/**
 * Setup: Loader
 */
require_once __DIR__ . '/../../Core/AutoLoader/AutoLoader.php';
AutoLoader::getNamespaceAutoLoader('\\MOC\\V', __DIR__ . '/../../');
var_dump(Captcha::getCaptcha()->createCaptcha()->getCaptcha());
/*
$File = FileSystem::getUniversalFileLoader( __FILE__ );
var_dump( $File->getLocation() );
var_dump( $File->getRealPath() );

$File = FileSystem::getSymfonyFinder( __FILE__ );
var_dump( $File->getLocation() );
var_dump( $File->getRealPath() );

$File = FileSystem::getSymfonyFinder( '/TestSuite/Console/index.php' );
var_dump( $File->getLocation() );
var_dump( $File->getRealPath() );

$File = FileSystem::getUniversalFileLoader( '/TestSuite/Console/index.php' );
var_dump( $File->getLocation() );