PHP Класс Nexcessnet_Turpentine_Helper_Cron

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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Наследование: extends Mage_Core_Helper_Abstract
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_crawlerClient Varien_Http_Client Crawler client singleton

Открытые методы

Метод Описание
addCategoryToCrawlerQueue ( Mage_Catalog_Model_Category $category ) : integer Add URLs to the queue by category model
addCmsPageToCrawlerQueue ( integer $cmsPageId ) : integer Add URLs to queue by CMS page ID
addProductToCrawlerQueue ( Mage_Catalog_Model_Product $product ) : integer Add URLs to the queue by product model
addUrlToCrawlerQueue ( string $url ) : boolean Add a single URL to the queue, returns whether it was actually added to the queue or not (false if it was already in the queue)
addUrlsToCrawlerQueue ( array $urls ) : integer Add a list of URLs to the queue, returns how many unique URLs were actually added to the queue
getAllUrls ( ) : array Get the list of all URLs
getAllowedRunTime ( ) : integer Get the max execution time (or 0 if unlimited)
getCrawlerBatchSize ( ) : integer Get number of urls to crawl per batch
getCrawlerClient ( ) : Varien_Http_Client Get the crawler http client
getCrawlerDebugEnabled ( ) : boolean Get if crawler debugging is enabled
getCrawlerEnabled ( ) : boolean Get if the crawler is enabled
getCrawlerWaitPeriod ( ) : integer Get time in seconds to wait between url batches
getNextUrl ( ) : string | null Pop a URL to crawl off the queue, or null if no URLs left
getRunTime ( ) : integer Get the execution time used so far
getUrlQueue ( ) : array Get the current URL queue

Защищенные методы

Метод Описание
_readUrlQueue ( ) : array Get the crawler URL queue from the cache
_writeUrlQueue ( array $urls ) : null Save the crawler URL queue to the cache

Описание методов

_readUrlQueue() защищенный Метод

Get the crawler URL queue from the cache
protected _readUrlQueue ( ) : array
Результат array

_writeUrlQueue() защищенный Метод

Save the crawler URL queue to the cache
protected _writeUrlQueue ( array $urls ) : null
$urls array
Результат null

addCategoryToCrawlerQueue() публичный Метод

Add URLs to the queue by category model
public addCategoryToCrawlerQueue ( Mage_Catalog_Model_Category $category ) : integer
$category Mage_Catalog_Model_Category
Результат integer

addCmsPageToCrawlerQueue() публичный Метод

Add URLs to queue by CMS page ID
public addCmsPageToCrawlerQueue ( integer $cmsPageId ) : integer
$cmsPageId integer
Результат integer

addProductToCrawlerQueue() публичный Метод

Add URLs to the queue by product model
public addProductToCrawlerQueue ( Mage_Catalog_Model_Product $product ) : integer
$product Mage_Catalog_Model_Product
Результат integer

addUrlToCrawlerQueue() публичный Метод

Add a single URL to the queue, returns whether it was actually added to the queue or not (false if it was already in the queue)
public addUrlToCrawlerQueue ( string $url ) : boolean
$url string
Результат boolean

addUrlsToCrawlerQueue() публичный Метод

Add a list of URLs to the queue, returns how many unique URLs were actually added to the queue
public addUrlsToCrawlerQueue ( array $urls ) : integer
$urls array
Результат integer

getAllUrls() публичный Метод

Get the list of all URLs
public getAllUrls ( ) : array
Результат array

getAllowedRunTime() публичный Метод

Get the max execution time (or 0 if unlimited)
public getAllowedRunTime ( ) : integer
Результат integer

getCrawlerBatchSize() публичный Метод

Get number of urls to crawl per batch
public getCrawlerBatchSize ( ) : integer
Результат integer

getCrawlerClient() публичный Метод

Get the crawler http client
public getCrawlerClient ( ) : Varien_Http_Client
Результат Varien_Http_Client

getCrawlerDebugEnabled() публичный Метод

Get if crawler debugging is enabled
public getCrawlerDebugEnabled ( ) : boolean
Результат boolean

getCrawlerEnabled() публичный Метод

Get if the crawler is enabled
public getCrawlerEnabled ( ) : boolean
Результат boolean

getCrawlerWaitPeriod() публичный Метод

Get time in seconds to wait between url batches
public getCrawlerWaitPeriod ( ) : integer
Результат integer

getNextUrl() публичный Метод

Pop a URL to crawl off the queue, or null if no URLs left
public getNextUrl ( ) : string | null
Результат string | null

getRunTime() публичный Метод

Get the execution time used so far
public getRunTime ( ) : integer
Результат integer

getUrlQueue() публичный Метод

Get the current URL queue
public getUrlQueue ( ) : array
Результат array

Описание свойств

$_crawlerClient защищенное свойство

Crawler client singleton
protected Varien_Http_Client $_crawlerClient
Результат Varien_Http_Client