本文整理汇总了PHP中lmbToolkit类的典型用法代码示例。如果您正苦于以下问题:PHP lmbToolkit类的具体用法?PHP lmbToolkit怎么用?PHP lmbToolkit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了lmbToolkit类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _getSession
/**
* @return lmbSession
*/
protected function _getSession()
{
if (is_null($this->_session)) {
$this->_session = lmbToolkit::instance()->getSession();
}
return $this->_session;
}
开发者ID:snowjobgit,项目名称:limb,代码行数:10,代码来源:lmbCacheSessionConnection.class.php
示例2: setUp
function setUp()
{
$this->connection = lmbToolkit::instance()->getDefaultDbConnection();
DriverMssqlSetup($this->connection->getConnectionId());
DriverMssqlExec($this->connection->getConnectionId(), "SET IDENTITY_INSERT founding_fathers OFF");
parent::setUp();
}
开发者ID:snowjobgit,项目名称:limb,代码行数:7,代码来源:lmbMssqlInsertTest.class.php
示例3: getTree
/**
* @return lmbMPTree
*/
function getTree()
{
if (!$this->_tree) {
$this->_tree = lmbToolkit::instance()->getCmsTree($this->getTableName(), $this->_db_conn);
}
return $this->_tree;
}
开发者ID:snowjobgit,项目名称:limb,代码行数:10,代码来源:lmbActiveRecordTreeNode.class.php
示例4: __construct
function __construct($filter_name)
{
$this->filter_name = $filter_name;
$this->toolkit = lmbToolkit::instance();
$this->request = $this->toolkit->getRequest();
$this->session = $this->toolkit->getSession();
}
开发者ID:snowjobgit,项目名称:limb,代码行数:7,代码来源:lmbCmsAdminFilterHelper.class.php
示例5: sendTo
function sendTo($recipients, $subject = null, $sender = null, $charset = 'utf-8')
{
$tools = lmbToolkit::instance();
$parts = self::_parseMailpartTags($this->_renderTemplate($tools));
if (!$sender) {
if (isset($parts['sender'])) {
$sender = $parts['sender'];
} else {
$sender = $this->getDefaultSender();
}
}
if (!$subject) {
if (!isset($parts['subject'])) {
throw new lmbException('Subject required for mail message');
} else {
$subject = $parts['subject'];
}
}
$html = isset($parts['html_body']) ? $parts['html_body'] : null;
$text = isset($parts['txt_body']) ? $parts['txt_body'] : null;
$mailer = $tools->getMailer();
if ($text and !$html) {
$mailer->sendPlainMail($recipients, $sender, $subject, $text, $charset);
} elseif ($html) {
$mailer->sendHtmlMail($recipients, $sender, $subject, $html, $text, $charset);
} else {
throw new lmbException('Contents required for mail message');
}
return $mailer;
}
开发者ID:snowjobgit,项目名称:limb,代码行数:30,代码来源:lmbMacroTemplateMail.class.php
示例6: getValue
function getValue()
{
$value = $this->base->getValue();
$toolkit = lmbToolkit::instance();
if (isset($this->parameters[0]) && $this->parameters[0]->getValue()) {
$locale = $toolkit->getLocaleObject($this->parameters[0]->getValue());
} else {
$locale = $toolkit->getLocaleObject();
}
if (isset($this->parameters[1]) && $this->parameters[1]->getValue()) {
$fract_digits = $this->parameters[1]->getValue();
} else {
$fract_digits = $locale->fract_digits;
}
if (isset($this->parameters[2]) && $this->parameters[2]->getValue()) {
$decimal_symbol = $this->parameters[2]->getValue();
} else {
$decimal_symbol = $locale->decimal_symbol;
}
if (isset($this->parameters[3]) && $this->parameters[3]->getValue()) {
$thousand_separator = $this->parameters[3]->getValue();
} else {
$thousand_separator = $locale->thousand_separator;
}
if ($this->isConstant()) {
return number_format($value, $fract_digits, $decimal_symbol, $thousand_separator);
} else {
$this->raiseUnresolvedBindingError();
}
}
开发者ID:knevcher,项目名称:limb,代码行数:30,代码来源:number.filter.php
示例7: setUp
function setUp()
{
$toolkit = lmbToolkit::instance();
$this->conn = $toolkit->getDefaultDbConnection();
$this->db = new lmbSimpleDb($this->conn);
$this->_cleanUp();
}
开发者ID:knevcher,项目名称:limb,代码行数:7,代码来源:lmbSimpleDbTest.class.php
示例8: _initRequestProperties
protected function _initRequestProperties($uri_string, $get, $post, $cookies, $files)
{
$this->__uri = !is_null($uri_string) ? new lmbUri($uri_string) : new lmbUri($this->getRawUriString());
$this->__get = !is_null($get) ? $get : $_GET;
$items = $this->__uri->getQueryItems();
foreach ($items as $k => $v) {
$this->__get[$k] = $v;
}
$this->__post = !is_null($post) ? $post : $_POST;
$this->__cookies = !is_null($cookies) ? $cookies : $_COOKIE;
$this->__files = !is_null($files) ? $this->_parseUploadedFiles($files) : $this->_parseUploadedFiles($_FILES);
$this->_defineRequestMethod();
if ($this->getRequestMethod() == 'PUT') {
$this->__put = lmbToolkit::instance()->getInputStreamParser()->parse();
}
if (ini_get('magic_quotes_gpc')) {
$this->__get = $this->_stripHttpSlashes($this->__get);
$this->__post = $this->_stripHttpSlashes($this->__post);
$this->__put = $this->_stripHttpSlashes($this->__put);
$this->__cookies = $this->_stripHttpSlashes($this->__cookies);
}
$this->__request = lmbArrayHelper::arrayMerge($this->__get, $this->__post, $this->__put, $this->__files);
foreach ($this->__request as $k => $v) {
if (in_array($k, $this->__reserved_attrs)) {
continue;
}
$this->set($k, $v);
}
}
开发者ID:knevcher,项目名称:korchasa_limb,代码行数:29,代码来源:lmbHttpRequest.class.php
示例9: locateTemplateByAlias
static function locateTemplateByAlias($alias)
{
$locator = lmbToolkit::instance()->getWactLocator();
if ($template_path = $locator->locateSourceTemplate($alias)) {
return $template_path;
}
}
开发者ID:knevcher,项目名称:limb,代码行数:7,代码来源:lmbWactView.class.php
示例10: appendStatementTo
function appendStatementTo(&$str, &$values = array(), $conn = null)
{
if (!is_object($conn)) {
$conn = lmbToolkit::instance()->getDefaultDbConnection();
}
if ($this->not_all) {
$str .= 'NOT(';
}
if ($this->not) {
$str .= 'NOT(';
}
$this->_appendExpressionToStatement($str, $values, $conn);
if ($this->not) {
$str .= ')';
}
for ($i = 0; $i < count($this->criteria); $i++) {
$criteria = $this->criteria[$i];
$str .= $this->conjunctions[$i];
if ($criteria->isComplex()) {
$str .= '(';
}
$criteria->appendStatementTo($str, $values, $conn);
if ($criteria->isComplex()) {
$str .= ')';
}
}
if ($this->not_all) {
$str .= ')';
}
}
开发者ID:snowjobgit,项目名称:limb,代码行数:30,代码来源:lmbSQLBaseCriteria.class.php
示例11: setUp
function setUp()
{
parent::setUp();
$config = new lmbSet(array('default_profile' => 'foo_profile', 'foo_profile' => array('type' => 'fckeditor', 'baz' => 42), 'bar_profile' => array('type' => 'tinymce', 'baz' => 111)));
lmbToolkit::instance()->setConf('wysiwyg', $config);
$this->_helper = new lmbWysiwygConfigurationHelper();
}
开发者ID:r-kitaev,项目名称:limb,代码行数:7,代码来源:lmbWysiwygConfigurationHelperTest.class.php
示例12: createCacheConnectionByName
function createCacheConnectionByName($name)
{
$conf = $this->toolkit->getConf('cache');
if (!$conf->get('cache_enabled')) {
return $this->createCacheFakeConnection();
} else {
try {
$dsn = lmbToolkit::instance()->getConf('cache')->get($name . '_cache_dsn');
if (!is_object($dsn)) {
$dsn = new lmbUri($dsn);
}
if (!($wrapper = $dsn->getQueryItem('wrapper'))) {
$wrapper = array();
}
if ($conf->get('taggable_cache_enabled', false)) {
$wrapper[] = 'taggable';
}
if ($conf->get('mint_cache_enabled', false)) {
$wrapper[] = 'mint';
}
if ($conf->get('cache_log_enabled', false)) {
$wrapper[] = 'logged';
}
$dsn->addQueryItem('wrapper', $wrapper);
return $this->createCacheConnectionByDSN($dsn);
} catch (Exception $e) {
return $this->createCacheFakeConnection();
}
}
}
开发者ID:snowjobgit,项目名称:limb,代码行数:30,代码来源:lmbCacheTools.class.php
示例13: __construct
function __construct($template_sql, $conn = null)
{
$this->_template_sql = $template_sql;
if (!is_object($conn)) {
$conn = lmbToolkit::instance()->getDefaultDbConnection();
}
$this->_conn = $conn;
}
开发者ID:snowjobgit,项目名称:limb,代码行数:8,代码来源:lmbTemplateQuery.class.php
示例14: _getDsnForUser
protected function _getDsnForUser($user, $password)
{
$this->toolkit = lmbToolkit::instance();
$dsn_uri = clone $this->toolkit->getDefaultDbDSN()->_getUri();
$dsn_uri->setUser($user);
$dsn_uri->setPassword($password);
return new lmbDbDSN($dsn_uri->toString());
}
开发者ID:snowjobgit,项目名称:limb,代码行数:8,代码来源:lmbPgsqlDbInfoTest.class.php
示例15: 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";
}
开发者ID:snowjobgit,项目名称:limb,代码行数:8,代码来源:init.inc.php
示例16: setUp
function setUp()
{
$this->connection = lmbToolkit::instance()->getDefaultDbConnection();
DriverLinterSetup($this->connection->getConnectionId());
$sql = 'SELECT "id", "first" FROM founding_fathers ORDER BY "id"';
$this->stmt = $this->connection->newStatement($sql);
$this->cursor = $this->stmt->getRecordSet();
}
开发者ID:knevcher,项目名称:limb,代码行数:8,代码来源:lmbLinterRecordSetTest.class.php
示例17: lmb_i18n
function lmb_i18n($text, $arg1 = null, $arg2 = null)
{
static $toolkit;
if (!$toolkit) {
$toolkit = lmbToolkit::instance();
}
return $toolkit->translate($text, $arg1, $arg2);
}
开发者ID:snowjobgit,项目名称:limb,代码行数:8,代码来源:common.inc.php
示例18: setUp
function setUp()
{
parent::setUp();
$this->conn = lmbToolkit::instance()->getDefaultDbConnection();
$dir_for_tests = lmb_var_dir() . '/constructor/';
$this->dir_for_test_case = $dir_for_tests . '/' . get_class($this);
lmbFs::mkdir($this->dir_for_test_case);
}
开发者ID:snowjobgit,项目名称:limb,代码行数:8,代码来源:lmbConstructorUnitTestCase.class.php
示例19: __construct
function __construct($file = null, $connection = null)
{
$this->file = $file;
if ($connection) {
$this->connection = $connection;
} else {
$this->connection = lmbToolkit::instance()->getDefaultDbConnection();
}
}
开发者ID:knevcher,项目名称:limb,代码行数:9,代码来源:lmbDbDump.class.php
示例20: run
function run($filter_chain)
{
$dispatched = lmbToolkit::instance()->getDispatchedController();
if (!is_object($dispatched)) {
throw new lmbException('Request is not dispatched yet! lmbDispatchedRequest not found in lmbToolkit!');
}
$dispatched->performAction();
$filter_chain->next();
}
开发者ID:snowjobgit,项目名称:limb,代码行数:9,代码来源:lmbActionPerformingFilter.class.php
注:本文中的lmbToolkit类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论