Пример #1
0
 /**
  * Testing Namespaces
  *
  * @return void
  */
 public function testNamespaces()
 {
     $this->assertEquals(array(), Zend_Validate::getDefaultNamespaces());
     $this->assertFalse(Zend_Validate::hasDefaultNamespaces());
     Zend_Validate::setDefaultNamespaces('TestDir');
     $this->assertEquals(array('TestDir'), Zend_Validate::getDefaultNamespaces());
     Zend_Validate::setDefaultNamespaces('OtherTestDir');
     $this->assertEquals(array('OtherTestDir'), Zend_Validate::getDefaultNamespaces());
     $this->assertTrue(Zend_Validate::hasDefaultNamespaces());
     Zend_Validate::setDefaultNamespaces(array());
     $this->assertEquals(array(), Zend_Validate::getDefaultNamespaces());
     $this->assertFalse(Zend_Validate::hasDefaultNamespaces());
     Zend_Validate::addDefaultNamespaces(array('One', 'Two'));
     $this->assertEquals(array('One', 'Two'), Zend_Validate::getDefaultNamespaces());
     Zend_Validate::addDefaultNamespaces('Three');
     $this->assertEquals(array('One', 'Two', 'Three'), Zend_Validate::getDefaultNamespaces());
     Zend_Validate::setDefaultNamespaces(array());
 }
Пример #2
0
require_once 'propel/runtime/lib/Propel.php';
Propel::init(__DIR__ . "/configs/airtime-conf-production.php");
require_once __DIR__ . "/configs/constants.php";
require_once 'Preference.php';
require_once 'Locale.php';
require_once "DateHelper.php";
require_once "OsPath.php";
require_once "Database.php";
require_once "Timezone.php";
require_once __DIR__ . '/forms/helpers/ValidationTypes.php';
require_once __DIR__ . '/controllers/plugins/RabbitMqPlugin.php';
require_once APPLICATION_PATH . "/logging/Logging.php";
Logging::setLogPath('/var/log/airtime/zendphp.log');
Config::setAirtimeVersion();
require_once __DIR__ . "/configs/navigation.php";
Zend_Validate::setDefaultNamespaces("Zend");
$front = Zend_Controller_Front::getInstance();
$front->registerPlugin(new RabbitMqPlugin());
//localization configuration
Application_Model_Locale::configureLocalization();
/* The bootstrap class should only be used to initialize actions that return a view.
   Actions that return JSON will not use the bootstrap class! */
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    protected function _initDoctype()
    {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->doctype('XHTML1_STRICT');
    }
    protected function _initGlobals()