本文整理汇总了PHP中lmb_require函数的典型用法代码示例。如果您正苦于以下问题:PHP lmb_require函数的具体用法?PHP lmb_require怎么用?PHP lmb_require使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了lmb_require函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createRequest
function createRequest($req = 'socket')
{
$class = 'lmb' . ucfirst($req) . 'WebAgentRequest';
$class_path = dirname(__FILE__) . '/request/' . $class . '.class.php';
lmb_require($class_path);
return new $class();
}
示例2: task_entity_create_admin
/**
* @desc create admin controller and admin templates for entity specified by table name
* @param table_name|all
* @deps entity_parse_table_argument
*/
function task_entity_create_admin()
{
lmb_require('limb/constructor/src/lmbAdminControllerConstructor.class.php');
_createAndRunConstructor('lmbAdminControllerConstructor');
lmb_require('limb/constructor/src/lmbAdminTemplatesConstructor.class.php');
_createAndRunConstructor('lmbAdminTemplatesConstructor');
}
示例3: _createInsertValidator
/**
* @return lmbValidator
*/
protected function _createInsertValidator()
{
$validator = $this->_createValidator();
$validator->addRequiredRule('password', 'Поле "Пароль" обязательно для заполнения');
lmb_require('limb/validation/src/rule/lmbMatchRule.class.php');
$validator->addRule(new lmbMatchRule('password', 'repeat_password', 'Значения полей "Пароль" и "Подтверждение пароля" не совпадают'));
return $validator;
}
示例4: lmb_tests_teardown_db
function lmb_tests_teardown_db()
{
$conn = lmbToolkit::instance()->getDefaultDbConnection();
lmb_require('limb/dbal/src/lmbSimpleDb.class.php');
$db = new lmbSimpleDb($conn);
$db->truncateDb();
echo "INFO: Database was cleaned up\n";
}
示例5: _getPalleteContainer
function _getPalleteContainer()
{
$class_name = $this->_getClass('lmb%ImageContainer');
lmb_require('limb/imagekit/src/' . $this->driver . '/' . $class_name . '.class.php');
$cont = new $class_name();
$cont->load($this->_getInputPalleteImage());
return $cont;
}
示例6: _createModelAndIncludeThem
function _createModelAndIncludeThem($table_name, $object_name)
{
$table = $this->conn->getDatabaseInfo()->getTable($table_name);
$model_constructor = new lmbModelConstructor(new lmbProjectConstructor($this->dir_for_test_case, new lmbCliOutput()), $this->conn->getDatabaseInfo(), $table, $object_name);
$model_constructor->create();
foreach (lmb_glob($this->dir_for_test_case . '/src/model/*.class.php') as $file) {
lmb_require($file);
}
}
示例7: _createValidator
protected function _createValidator()
{
lmb_require('limb/cms/src/validation/rule/lmbCmsUniqueFieldRule.class.php');
$validator = new lmbValidator();
$validator->addRequiredRule('title', '"Title" обязательное поле');
$validator->addRequiredRule('url', '"Url" обязательное поле');
$validator->addRule(new lmbCmsUniqueFieldRule('url', 'lmbCmsSeo', $this, '"Url" должен быть уникальным'));
return $validator;
}
示例8: getResponse
function getResponse()
{
if (is_object($this->response)) {
return $this->response;
}
lmb_require('limb/net/src/lmbHttpResponse.class.php');
$this->response = new lmbHttpResponse();
return $this->response;
}
示例9: _createValidator
/**
* @return lmbValidator
*/
protected function _createValidator()
{
$validator = new lmbValidator();
$validator->addRequiredRule('identifier', 'Поле "Идентификатор" обязательно для заполнения');
$validator->addRequiredRule('content', 'Поле "Текст" обязательно для заполнения');
lmb_require('limb/cms/src/validation/rule/lmbCmsTextBlockUniqueFieldRule.class.php');
$validator->addRule(new lmbCmsTextBlockUniqueFieldRule('identifier', $this, 'Текстовый блок со значением поля "Идентификатор" уже существует'));
return $validator;
}
示例10: _createCompiler
protected function _createCompiler()
{
lmb_require('limb/macro/src/compiler/*.interface.php');
lmb_require('limb/macro/src/compiler/*.class.php');
$tag_dictionary = lmbMacroTagDictionary::instance();
$filter_dictionary = lmbMacroFilterDictionary::instance();
$tag_dictionary->load($this->config);
$filter_dictionary->load($this->config);
return new lmbMacroCompiler($tag_dictionary, $this->locator, $filter_dictionary);
}
示例11: _createValidator
function _createValidator()
{
$validator = new lmbValidator();
$validator->addRequiredRule('title', 'Поле "Заголовок" обязательно для заполнения');
$validator->addRequiredRule('content', 'Поле "Текст" обязательно для заполнения');
$validator->addRequiredRule('identifier', 'Поле "Идентификатор" обязательно для заполнения');
lmb_require('limb/cms/src/validation/rule/lmbTreeIdentifierRule.class.php');
$validator->addRule(new lmbTreeIdentifierRule('identifier'));
return $validator;
}
示例12: _includeFiles
protected function _includeFiles()
{
if (function_exists('lmb_require')) {
foreach ($this->class_paths as $path) {
lmb_require($path);
}
} else {
foreach ($this->class_paths as $path) {
require_once $path;
}
}
}
示例13: applyWrapper
protected static function applyWrapper($connection, $wrapper_name)
{
$wrapper_class = 'lmb' . ucfirst($wrapper_name) . 'CacheWrapper';
if (!class_exists($wrapper_class)) {
$file = DIRNAME(__FILE__) . '/wrappers/' . $wrapper_class . '.class.php';
if (!file_exists($file)) {
throw new lmbException("Cache wripper '{$wrapper_class}' file not found", array('dsn' => $dsn, 'name' => $wrapper_name, 'class' => $wrapper_class, 'file' => $file));
}
lmb_require($file);
}
return new $wrapper_class($connection);
}
示例14: create
static function create($library = 'gd', $dir = '', $params = array())
{
$image_class_name = 'lmb' . ucfirst($library) . 'ImageConverter';
$class_path = 'limb/imagekit/src/' . $library . '/' . $image_class_name . '.class.php';
lmb_require($class_path);
try {
$converter = new $image_class_name($params);
} catch (lmbException $e) {
throw new lmbFileNotFoundException($class_path, 'image library not found');
}
return $converter;
}
示例15: _createLogWriter
protected function _createLogWriter($dsn)
{
if (!is_object($dsn)) {
$dsn = new lmbUri($dsn);
}
$writer_name = 'lmbLog' . ucfirst($dsn->getProtocol()) . 'Writer';
$writer_file = 'limb/log/src/' . $writer_name . '.class.php';
try {
lmb_require($writer_file);
$writer = new $writer_name($dsn);
return $writer;
} catch (lmbFileNotFoundException $e) {
throw new lmbFileNotFoundException($writer_file, 'Log writer not found');
}
}