Prado and loading modules at runtime
Today I had big problems trying to load modules in Prado from the TPage, not using the application.xml. I had such a requirement for the globalization utility in our web application. So after hours of pain finaly I found the magic lines of code that allow this to happen. I am surprised that there was no entry in the documentation or in the forums .
Here is the code:
$doc = new TXmlDocument(); $doc->loadFromString(' <module id="db1"> <database ConnectionString="mysql:host=localhost;dbname=dbdb" Username="dbdb" Password="dbdb" /> </module> '); Prado::using('System.Data.TDataSourceConfig'); $db = new TDataSourceConfig(); $this->Application->setModule('db1',$db); $db->init($doc);
This post is also available in: Bulgarian
Needless to say, David likes to play big. He does this all year long with his company based in Los Angeles and also travels to Las Vegas, or New Orleans or wherever an event may take him
led street lights OAK LED Co ,Limited is one of the top level China LED street lights manufacturers and suppliers with one of the famous LED street lights brands, as a professional company, we have our own factory, which is able to produce high quality products with reliable quality led street lights