本文整理汇总了PHP中Zend_Validate::setDefaultNamespaces方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Validate::setDefaultNamespaces方法的具体用法?PHP Zend_Validate::setDefaultNamespaces怎么用?PHP Zend_Validate::setDefaultNamespaces使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Validate
的用法示例。
在下文中一共展示了Zend_Validate::setDefaultNamespaces方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testNamespaces
/**
* 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: _initDoctype
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()