当前位置: 首页>>代码示例>>PHP>>正文


PHP QQ::LimitInfo方法代码示例

本文整理汇总了PHP中QQ::LimitInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP QQ::LimitInfo方法的具体用法?PHP QQ::LimitInfo怎么用?PHP QQ::LimitInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QQ的用法示例。


在下文中一共展示了QQ::LimitInfo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($objParentObject, $strControlId = null)
 {
     parent::__construct($objParentObject, $strControlId);
     $this->blnAutoRenderChildren = true;
     $this->strTemplate = dirname(__FILE__) . '/' . __CLASS__ . '.tpl.php';
     $this->txtSearch = new QTextBox($this);
     $this->txtSearch->Name = t('Text');
     $this->txtSearch->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'txtSearch_KeyUp'));
     $this->txtSearch->SetCustomAttribute('autocomplete', 'off');
     $this->btnClear = new QImageButton($this);
     $this->btnClear->AlternateText = t('Clear');
     $this->btnClear->ToolTip = $this->btnClear->AlternateText;
     $this->btnClear->CssClass = 'clear_button';
     $this->btnClear->ImageUrl = __NARRO_IMAGE_ASSETS__ . '/clear.png';
     $this->btnClear->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnClear_Click'));
     $this->lstLanguage = new QListBox($this);
     $arrLanguages = NarroLanguage::LoadAllActive(QQ::OrderBy(QQN::NarroLanguage()->LanguageName));
     foreach ($arrLanguages as $objLanguage) {
         $this->lstLanguage->AddItem(t($objLanguage->LanguageName), $objLanguage->LanguageId, $objLanguage->LanguageCode == QApplication::$TargetLanguage->LanguageCode);
     }
     $this->btnSearch = new QImageButton($this);
     $this->btnSearch->AlternateText = t('Search');
     $this->btnSearch->ToolTip = $this->btnSearch->AlternateText;
     $this->btnSearch->CssClass = 'clear_button';
     $this->btnSearch->ImageUrl = __NARRO_IMAGE_ASSETS__ . '/search.png';
     $this->btnSearch->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'txtSearch_KeyUp'));
     $this->dtgSuggestion = new NarroSuggestionDataGrid($this);
     $this->dtgSuggestion->ShowHeader = false;
     $this->dtgSuggestion->MetaAddColumn(QQN::NarroSuggestion()->SuggestionValue);
     $this->dtgSuggestion->AdditionalClauses = array(QQ::LimitInfo(20), QQ::OrderBy(QQN::NarroSuggestion()->Text->TextCharCount));
     $this->btnClear_Click();
 }
开发者ID:Jobava,项目名称:narro,代码行数:32,代码来源:NarroSuggestionSearchPanel.class.php

示例2: LoadWpPosts

 /**
  * @return WpPosts|null The WpPosts object, that is a copy of this DLE post.
  */
 public function LoadWpPosts()
 {
     $objWpUsers = $this->LoadWpUser();
     if (!$objWpUsers) {
         return null;
     }
     return WpPosts::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::WpPosts()->PostAuthor, $objWpUsers->Id), QQ::Equal(QQN::WpPosts()->PostDate, $this->Date), QQ::Equal(QQN::WpPosts()->PostName, $this->AltName)), QQ::Clause(QQ::LimitInfo(1)));
 }
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:11,代码来源:DlePost.class.php

示例3: RefreshStats

 public function RefreshStats()
 {
     $this->intPackageCount = $this->CountPackages();
     $objPackage = Package::QuerySingle(QQ::Equal(QQN::Package()->PackageCategoryId, $this->intId), QQ::Clause(QQ::LimitInfo(1), QQ::OrderBy(QQN::Package()->LastPostDate, false)));
     if ($objPackage && $objPackage->LastPostDate) {
         $this->dttLastPostDate = new QDateTime($objPackage->LastPostDate);
     } else {
         $this->dttLastPostDate = null;
     }
     $this->Save();
 }
开发者ID:qcodo,项目名称:qcodo-website,代码行数:11,代码来源:PackageCategory.class.php

示例4: RefreshStats

 /**
  * This will refresh all the stats (last post date, message/topic counts) and save the record to the database
  * @return void
  */
 public function RefreshStats()
 {
     $objMessage = Message::QuerySingle(QQ::Equal(QQN::Message()->TopicLinkId, $this->intId), QQ::Clause(QQ::OrderBy(QQN::Message()->PostDate, false), QQ::LimitInfo(1)));
     if ($objMessage) {
         $this->dttLastPostDate = $objMessage->PostDate;
     } else {
         $this->dttLastPostDate = null;
     }
     $this->intMessageCount = Message::CountByTopicLinkId($this->intId);
     $this->intTopicCount = Topic::CountByTopicLinkId($this->intId);
     $this->Save();
 }
开发者ID:qcodo,项目名称:qcodo-website,代码行数:16,代码来源:TopicLink.class.php

示例5: LoadWpComments

 /**
  * @return WpComments|null The Worpress comment for this DLE comment.
  */
 public function LoadWpComments()
 {
     $objWpPosts = $this->LoadWpPosts();
     if (!$objWpPosts) {
         return null;
     }
     $objWpUsers = $this->LoadWpUsers();
     $conUsersCondition = QQ::Equal(QQN::WpComments()->CommentAuthorEmail, $this->Email);
     if ($objWpUsers) {
         $conUsersCondition = QQ::Equal(QQN::WpComments()->UserId, $objWpUsers->Id);
     }
     return WpComments::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::WpComments()->CommentPostID, $objWpPosts->Id), $conUsersCondition, QQ::Equal(QQN::WpComments()->CommentDate, $this->Date), QQ::Equal(QQN::WpComments()->CommentContent, str_replace('\\"', '"', $this->Text))), QQ::Clause(QQ::OrderBy(QQN::WpComments()->CommentID), QQ::LimitInfo(1)));
 }
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:16,代码来源:DleComments.class.php

示例6: LoadAssetTransactionCheckoutByAssetId

 /**
  * Load a single AssetTransactionCheckout object,
  * by AssetId
  * @param integer $intAssetId
  * @return object $objAssetTransactionCheckout
  */
 public function LoadAssetTransactionCheckoutByAssetId($intAssetId = null)
 {
     // Loads objAssetTransaction
     $objClauses = array();
     $objOrderByClause = QQ::OrderBy(QQN::AssetTransaction()->Transaction->CreationDate, false);
     $objLimitClause = QQ::LimitInfo(1, 0);
     array_push($objClauses, $objOrderByClause);
     array_push($objClauses, $objLimitClause);
     $AssetTransactionArray = AssetTransaction::LoadArrayByAssetId($this->AssetId, $objClauses);
     $intLastAssetTransactionId = $AssetTransactionArray[0]->AssetTransactionId;
     $objAssetTransactionCheckout = AssetTransactionCheckout::LoadByAssetTransactionId($intAssetLastTransactionId);
     return $objAssetTransactionCheckout;
 }
开发者ID:brustj,项目名称:tracmor,代码行数:19,代码来源:AssetTransactionCheckout.class.php

示例7: get_objects_array

 /**
  * @return mixed[] The array of DB ORM objects to process.
  * @param int $intOffset The offset means already processed objects exclusion.
  */
 protected function get_objects_array($intOffset)
 {
     return WpTermTaxonomy::LoadAll(QQ::Clause(QQ::LimitInfo(10, $intOffset), QQ::OrderBy(QQN::WpTermTaxonomy()->TermTaxonomyId)));
 }
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:8,代码来源:WpTermTaxonomyCountTask.class.php

示例8: Form_Create

 protected function Form_Create()
 {
     parent::Form_Create();
     $this->objBlogTopicArray = Topic::QueryArray(QQ::Equal(QQN::Topic()->TopicLink->ForumId, 5), QQ::Clause(QQ::OrderBy(QQN::Topic()->Id, false), QQ::LimitInfo(4)));
 }
开发者ID:qcodo,项目名称:qcodo-website,代码行数:5,代码来源:index.php

示例9: GetMostRecentContribution

 /**
  * Gets the most recently updated or uploaded contribution
  * @return PackageContribution
  */
 public function GetMostRecentContribution()
 {
     return PackageContribution::QuerySingle(QQ::Equal(QQN::PackageContribution()->PackageId, $this->intId), QQ::Clause(QQ::OrderBy(QQN::PackageContribution()->CurrentPostDate, false), QQ::LimitInfo(1)));
 }
开发者ID:klucznik,项目名称:qcodo-website,代码行数:8,代码来源:Package.class.php

示例10: GetSugestionArray

 protected function GetSugestionArray()
 {
     $this->arrSuggestion = NarroSuggestion::QueryArray(QQ::AndCondition(QQ::Equal(QQN::NarroSuggestion()->Text->NarroContextAsText->FileId, $this->objFile->FileId), QQ::Equal(QQN::NarroSuggestion()->LanguageId, $this->objTargetLanguage->LanguageId)), array(QQ::Expand(QQN::NarroSuggestion()->User), QQ::Expand(QQN::NarroSuggestion()->Text), QQ::LimitInfo(500, 0)));
 }
开发者ID:Jobava,项目名称:narro,代码行数:4,代码来源:NarroFileImporter.class.php

示例11: dirname

 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any
 * later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with this program; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
require_once dirname(__FILE__) . '/configuration/prepend.inc.php';
if (isset($argv[0])) {
    $intCnt = 0;
    $intSkipped = 0;
    foreach (NarroSuggestion::QueryArray(QQ::AndCondition(QQ::NotEqual(QQN::NarroSuggestion()->UserId, 0), QQ::LessThan(QQN::NarroSuggestion()->SuggestionWordCount, 1)), array(QQ::OrderBy(QQN::NarroSuggestion()->SuggestionId, 0), QQ::LimitInfo(10000, 0))) as $intVal => $objSuggestion) {
        if ($objSuggestion->SuggestionValueMd5 != md5($objSuggestion->SuggestionValue)) {
            $intSkipped++;
            continue;
        }
        try {
            $objSuggestion->SaveWordCount();
            $intCnt++;
        } catch (Exception $objEx) {
            echo $objEx->getMessage();
        }
    }
    printf("Skipped %d, saved %d suggestions, last suggestion id is %d\n", $intSkipped, $intCnt, $objSuggestion->SuggestionId);
    die;
}
//    if (QApplication::HasPermission('Administrator')) {
开发者ID:Jobava,项目名称:narro,代码行数:31,代码来源:update_narro_from_0.9.4_to_1.0.0.php

示例12: ini_set

<?php

// Up the Memory Limit
ini_set('memory_limit', '256M');
// Ensure we are NOT running
QApplication::CliProcessEnsureUnique();
// Setup a Lock File
QApplication::CliProcessSetupLockFile();
// Run the Logic/Code
while (QApplication::CliProcessIsLockFileValid()) {
    // Analyze only 10 at a time, starting with the oldest (E.g. lowest ID) first
    $objMessageArray = OutgoingEmailQueue::LoadArrayByErrorFlag(false, array(QQ::OrderBy(QQN::OutgoingEmailQueue()->Id), QQ::LimitInfo(10)));
    foreach ($objMessageArray as $objMessage) {
        // Send up to 100 at a time for any given EmailMessage
        $objMessage->Send();
    }
    sleep(10);
}
开发者ID:alcf,项目名称:chms,代码行数:18,代码来源:outgoing-email-queue.cli.php

示例13: _GetAjaxData

 /**
  * Respond to a data request and return the data object
  * Will include row id and row class if those are provided.
  * @param string $strFormId
  * @param string $strControlId
  * @param string $strParameter
  */
 public function _GetAjaxData($strFormId, $strControlId, $strParameter)
 {
     $this->objOrderByClause = null;
     $this->intDrawCount = null;
     $data = $strParameter;
     // Set limit info for partial data requests
     if (isset($data['start']) && isset($data['length']) && $data['length'] != '-1') {
         $this->intDisplayStart = QType::Cast($data['start'], QType::Integer);
         $this->intPageLength = QType::Cast($data['length'], QType::Integer);
         $this->objLimitInfo = QQ::LimitInfo($this->intPageLength, $this->intDisplayStart);
     }
     if (isset($data['order'])) {
         $sortCols = $data['order'];
         $intSortColsCount = count($sortCols);
         // We only support ordering by one column at this point
         //for ($i = 0; $i < $intSortColsCount; $i++) {
         $i = 0;
         $intSortColIdx = QType::Cast($sortCols[$i]['column'], QType::Integer);
         $objColumn = $this->GetColumn($intSortColIdx);
         $strSortDir = QType::Cast($sortCols[$i]['dir'], QType::String);
         if (strtolower($strSortDir) == 'desc') {
             if ($objColumn->ReverseOrderByClause) {
                 $this->objOrderByClause = $objColumn->ReverseOrderByClause;
             }
         } else {
             if ($objColumn->OrderByClause) {
                 $this->objOrderByClause = $objColumn->OrderByClause;
             }
         }
         // Save so that if table is redrawn, order will be preserved.
         $this->arrOrder = [];
         $this->arrOrder[] = [$intSortColIdx, $strSortDir];
         //}
     }
     if (isset($data['search']['value'])) {
         // TODO: Support RegEx searching. Will require implementing regex in database adapters. Will take work.
         if (!is_array($this->mixSearch)) {
             $this->mixSearch = [];
         }
         $this->mixSearch['search'] = QType::Cast($data['search']['value'], QType::String);
     }
     // If column level searching is enabled, save off values
     $this->arrSearchCols = null;
     if (!empty($data['columns'])) {
         $this->arrSearchCols = [];
         foreach ($data['columns'] as $key => $values) {
             if (!empty($values['searchable'])) {
                 $this->arrSearchCols[$key]['search'] = $values['search']['value'];
                 // TODO: Deal with the regex flag
             } else {
                 $this->arrSearchCols[$key]['search'] = null;
             }
         }
     }
     if (isset($data['draw'])) {
         $this->intDrawCount = QType::Cast($data['draw'], QType::Integer);
     }
     // Get the data and send it back to the control
     if (!is_null($this->intDrawCount)) {
         // Required drawing count, aids in helping control keep track of ajax responses
         $this->DataBind();
         $mixDataArray = array();
         if ($this->objDataSource) {
             $rowIndex = 0;
             if (isset($intOffset)) {
                 $rowIndex = $intOffset;
             }
             foreach ($this->objDataSource as $objObject) {
                 $row = $this->AjaxGetRowData($objObject, $rowIndex);
                 $rowIndex++;
                 $mixDataArray[] = $row;
             }
         }
         $filteredCount = $this->mixSearch ? $this->FilteredItemCount : $this->TotalItemCount;
         if (!$filteredCount || $filteredCount < count($mixDataArray)) {
             $filteredCount = count($mixDataArray);
         }
         $output = array("draw" => $this->intDrawCount, "recordsTotal" => $this->TotalItemCount, "recordsFiltered" => $filteredCount, "data" => $mixDataArray);
         $output = JavaScriptHelper::toJsObject($output);
         $strJS = sprintf('$j("#%s").data("dtResponse")(%s);', $this->ControlId, $output);
         QApplication::ExecuteJavaScript($strJS, QJsPriority::Exclusive);
         $this->objDataSource = null;
         $this->intDrawCount = null;
     }
 }
开发者ID:qcubed,项目名称:plugin_datatables,代码行数:92,代码来源:QDataTableBase.php

示例14: txtSearch_Autocomplete

 public function txtSearch_Autocomplete()
 {
     $arrReturn = array();
     $arrConditions = array(QQ::Like(QQN::NarroProject()->ProjectName, '%' . $this->txtSearch->Text . '%'));
     if (!QApplication::HasPermission('Administrator')) {
         $arrConditions[] = QQ::Equal(QQN::NarroProject()->Active, true);
     }
     foreach (NarroProject::QueryArray(QQ::AndCondition($arrConditions), array(QQ::LimitInfo(10, 0))) as $objProject) {
         $arrReturn[] = $objProject->ProjectName;
     }
     $this->txtSearch->DataSource = $arrReturn;
 }
开发者ID:Jobava,项目名称:narro,代码行数:12,代码来源:NarroProjectListPanel.class.php

示例15: LoadFirst

 public function LoadFirst()
 {
     return self::QuerySingle(QQ::All(), QQ::Clause(QQ::OrderBy(QQN::WpUsers()->Id), QQ::LimitInfo(1)));
 }
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:4,代码来源:WpUsers.class.php


注:本文中的QQ::LimitInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。