// CFG: DECIMALS-SEPARATOR
$cfg->setConfigEntry('decimals_separator', ',');
+
+// CFG: CRYPTO-MCRYPT-STREAM-CLASS
+$cfg->setConfigEntry('crypto_mcrypt_stream_class', 'Org\Mxchange\CoreFramework\Stream\Crypto\McryptStream');
+
+// CFG: CRYPTO-OPENSSL-STREAM-CLASS
+$cfg->setConfigEntry('crypto_openssl_stream_class', 'Org\Mxchange\CoreFramework\Stream\Crypto\OpenSslStream');
+
+// CFG: CRYPTO-NULL-STREAM-CLASS
+$cfg->setConfigEntry('crypto_null_stream_class', 'Org\Mxchange\CoreFramework\Stream\Crypto\NullCryptoStream');
use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
use Org\Mxchange\CoreFramework\Criteria\Local\LocalUpdateCriteria;
use Org\Mxchange\CoreFramework\Crypto\Cryptable;
-use Org\Mxchange\CoreFramework\Crypto\RandomNumber\RandomNumberGenerator;
use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
use Org\Mxchange\CoreFramework\Loader\ClassLoader;
use Org\Mxchange\CoreFramework\Localization\ManageableLanguage;
use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
-use Org\Mxchange\CoreFramework\Menu\RenderableMenu;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
use Org\Mxchange\CoreFramework\Result\Database\CachedDatabaseResult;
*/
private $userInstance = NULL;
- /**
- * Instance of a RNG
- */
- private $rngInstance = NULL;
-
/**
* Instance of a crypto helper
*/
*/
private $listInstance = NULL;
- /**
- * Instance of a menu
- */
- private $menuInstance = NULL;
-
- /**
- * Instance of the image
- */
- private $imageInstance = NULL;
-
/**
* A helper instance for the form
*/
return $this->userInstance;
}
- /**
- * Setter for RNG instance
- *
- * @param $rngInstance An instance of a random number generator (RNG)
- * @return void
- */
- protected final function setRngInstance (RandomNumberGenerator $rngInstance) {
- $this->rngInstance = $rngInstance;
- }
-
- /**
- * Getter for RNG instance
- *
- * @return $rngInstance An instance of a random number generator (RNG)
- */
- public final function getRngInstance () {
- return $this->rngInstance;
- }
-
/**
* Setter for Cryptable instance
*
return $this->listInstance;
}
- /**
- * Setter for the menu instance
- *
- * @param $menuInstance A RenderableMenu instance
- * @return void
- */
- protected final function setMenuInstance (RenderableMenu $menuInstance) {
- $this->menuInstance = $menuInstance;
- }
-
- /**
- * Getter for the menu instance
- *
- * @return $menuInstance A RenderableMenu instance
- */
- protected final function getMenuInstance () {
- return $this->menuInstance;
- }
-
- /**
- * Setter for image instance
- *
- * @param $imageInstance An instance of an image
- * @return void
- */
- public final function setImageInstance (BaseImage $imageInstance) {
- $this->imageInstance = $imageInstance;
- }
-
- /**
- * Getter for image instance
- *
- * @return $imageInstance An instance of an image
- */
- public final function getImageInstance () {
- return $this->imageInstance;
- }
-
/**
* Setter for DatabaseWrapper instance
*
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Crypto\Cryptable;
+use Org\Mxchange\CoreFramework\Crypto\RandomNumber\RandomNumberGenerator;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
*/
private $salt = '';
+ /**
+ * Instance of a RNG
+ */
+ private $rngInstance = NULL;
+
/**
* Protected constructor
*
return self::$selfInstance;
}
+ /**
+ * Setter for RNG instance
+ *
+ * @param $rngInstance An instance of a random number generator (RNG)
+ * @return void
+ */
+ protected final function setRngInstance (RandomNumberGenerator $rngInstance) {
+ $this->rngInstance = $rngInstance;
+ }
+
+ /**
+ * Getter for RNG instance
+ *
+ * @return $rngInstance An instance of a random number generator (RNG)
+ */
+ public final function getRngInstance () {
+ return $this->rngInstance;
+ }
+
/**
* Attaches a crypto stream to this crypto helper by detecting loaded
* modules.
// Do we have openssl/mcrypt loaded?
if ($this->isPhpExtensionLoaded('mcrypt')) {
// Then use it
- $this->cryptoStreamInstance = ObjectFactory::createObjectByName('Org\Mxchange\CoreFramework\Stream\Crypto\McryptStream', array($this->getRngInstance()));
+ $this->cryptoStreamInstance = ObjectFactory::createObjectByConfiguredName('crypto_mcrypt_stream_class', array($this->getRngInstance()));
} elseif ($this->isPhpExtensionLoaded('openssl')) {
// Then use it
- $this->cryptoStreamInstance = ObjectFactory::createObjectByName('Org\Mxchange\CoreFramework\Stream\Crypto\OpenSslStream', array($this->getRngInstance()));
+ $this->cryptoStreamInstance = ObjectFactory::createObjectByConfiguredName('crypto_openssl_stream_class', array($this->getRngInstance()));
} else {
// If nothing works ...
- $this->cryptoStreamInstance = ObjectFactory::createObjectByName('Org\Mxchange\CoreFramework\Stream\Crypto\NullCryptoStream');
+ $this->cryptoStreamInstance = ObjectFactory::createObjectByConfiguredName('crypto_null_stream_class');
}
}
namespace Org\Mxchange\CoreFramework\Helper\Captcha;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Crypto\RandomNumber\RandomNumberGenerator;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Helper\BaseHelper;
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
abstract class BaseCaptcha extends BaseHelper {
+ /**
+ * Instance of a RNG
+ */
+ private $rngInstance = NULL;
+
/**
* Protected constructor
*
parent::__construct($className);
}
+ /**
+ * Setter for RNG instance
+ *
+ * @param $rngInstance An instance of a random number generator (RNG)
+ * @return void
+ */
+ protected final function setRngInstance (RandomNumberGenerator $rngInstance) {
+ $this->rngInstance = $rngInstance;
+ }
+
+ /**
+ * Getter for RNG instance
+ *
+ * @return $rngInstance An instance of a random number generator (RNG)
+ */
+ public final function getRngInstance () {
+ return $this->rngInstance;
+ }
+
/**
* Initializes the random number generator (RNG)
*
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Image\BaseImage;
use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
use Org\Mxchange\CoreFramework\Response\Responseable;
* Michal Cihar <michal@cihar.com>, licensed under GNU GPL 2.0.
*/
class ImageResponse extends BaseResponse implements Responseable {
+ /**
+ * Instance of the image
+ */
+ private $imageInstance = NULL;
+
/**
* Protected constructor
*
return $responseInstance;
}
+ /**
+ * Setter for image instance
+ *
+ * @param $imageInstance An instance of an image
+ * @return void
+ */
+ public final function setImageInstance (BaseImage $imageInstance) {
+ $this->imageInstance = $imageInstance;
+ }
+
+ /**
+ * Getter for image instance
+ *
+ * @return $imageInstance An instance of an image
+ */
+ public final function getImageInstance () {
+ return $this->imageInstance;
+ }
+
/**
* Initializes the template engine instance
*
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Filesystem\InvalidDirectoryException;
+use Org\Mxchange\CoreFramework\Image\BaseImage;
use Org\Mxchange\CoreFramework\Parser\Xml\XmlParser;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
private $currMainNode = '';
+ /**
+ * Instance of the image
+ */
+ private $imageInstance = NULL;
+
/**
* Protected constructor
*
return $this->subNodes;
}
+ /**
+ * Setter for image instance
+ *
+ * @param $imageInstance An instance of an image
+ * @return void
+ */
+ public final function setImageInstance (BaseImage $imageInstance) {
+ $this->imageInstance = $imageInstance;
+ }
+
+ /**
+ * Getter for image instance
+ *
+ * @return $imageInstance An instance of an image
+ */
+ public final function getImageInstance () {
+ return $this->imageInstance;
+ }
+
/**
* Handles the start element of an XML resource
*
}
// Construct method name
- $methodName = 'finish' . StringUtils::convertToClassName($nodeName);
+ $methodName = sprintf('finish%s', StringUtils::convertToClassName($nodeName));
// Call the corresponding method
call_user_func_array(array($this->getImageInstance(), $methodName), array());
*
* @param $responseInstance An instance of a Responseable class
* @return void
+ * @todo Nothing to really "transfer" here?
*/
public function transferToResponse (Responseable $responseInstance) {
// Set the image instance
*/
private $menuBlocks = array();
- /**
- * Menu instance
- */
- private $menuInstance = NULL;
-
/**
* Current main node
*/
*/
private $dependencyContent = array();
+ /**
+ * Instance of a menu
+ */
+ private $menuInstance = NULL;
+
/**
* Protected constructor
*
return $templateInstance;
}
+ /**
+ * Setter for the menu instance
+ *
+ * @param $menuInstance A RenderableMenu instance
+ * @return void
+ */
+ protected final function setMenuInstance (RenderableMenu $menuInstance) {
+ $this->menuInstance = $menuInstance;
+ }
+
+ /**
+ * Getter for the menu instance
+ *
+ * @return $menuInstance A RenderableMenu instance
+ */
+ private final function getMenuInstance () {
+ return $this->menuInstance;
+ }
+
/**
* Load a specified menu template into the engine
*