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
파일 보기 프로젝트 열기: nexcess/magento-turpentine

보호된 프로퍼티들

프로퍼티 타입 설명
$_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