PHP 클래스 Wallabag\ImportBundle\Import\AbstractImport

상속: implements Wallabag\ImportBundle\Import\ImportInterface
파일 보기 프로젝트 열기: wallabag/wallabag

보호된 프로퍼티들

프로퍼티 타입 설명
$contentProxy
$em
$importedEntries
$logger
$markAsRead
$producer
$queuedEntries
$skippedEntries
$user

공개 메소드들

메소드 설명
__construct ( EntityManager $em, ContentProxy $contentProxy )
getMarkAsRead ( ) Get whether articles must be all marked as read.
getSummary ( )
parseEntry ( array $importedEntry ) : Entry Parse one entry.
setLogger ( Psr\Log\LoggerInterface $logger )
setMarkAsRead ( boolean $markAsRead ) Set whether articles must be all marked as read.
setProducer ( OldSound\RabbitMqBundle\RabbitMq\ProducerInterface $producer ) Set RabbitMQ/Redis Producer to send each entry to a queue.
setUser ( User $user ) Set current user.

보호된 메소드들

메소드 설명
fetchContent ( Entry $entry, string $url, array $content = [] ) : Entry Fetch content from the ContentProxy (using graby).
parseEntries ( $entries ) Parse and insert all given entries.
parseEntriesForProducer ( array $entries ) Parse entries and send them to the queue.
setEntryAsRead ( array $importedEntry ) : array Set current imported entry to archived / read.

메소드 상세

__construct() 공개 메소드

public __construct ( EntityManager $em, ContentProxy $contentProxy )
$em Doctrine\ORM\EntityManager
$contentProxy Wallabag\CoreBundle\Helper\ContentProxy

fetchContent() 보호된 메소드

If it fails return the given entry to be saved in all case (to avoid user to loose the content).
protected fetchContent ( Entry $entry, string $url, array $content = [] ) : Entry
$entry Wallabag\CoreBundle\Entity\Entry Entry to update
$url string Url to grab content for
$content array An array with AT LEAST keys title, html, url, language & content_type to skip the fetchContent from the url
리턴 Wallabag\CoreBundle\Entity\Entry

getMarkAsRead() 공개 메소드

Get whether articles must be all marked as read.
public getMarkAsRead ( )

getSummary() 공개 메소드

public getSummary ( )

parseEntries() 보호된 메소드

Parse and insert all given entries.
protected parseEntries ( $entries )
$entries

parseEntriesForProducer() 보호된 메소드

It should just be a simple loop on all item, no call to the database should be done to speedup queuing. Faster parse entries for Producer. We don't care to make check at this time. They'll be done by the consumer.
protected parseEntriesForProducer ( array $entries )
$entries array

parseEntry() 추상적인 공개 메소드

Parse one entry.
abstract public parseEntry ( array $importedEntry ) : Entry
$importedEntry array
리턴 Wallabag\CoreBundle\Entity\Entry

setEntryAsRead() 추상적인 보호된 메소드

Implementation is different accross all imports.
abstract protected setEntryAsRead ( array $importedEntry ) : array
$importedEntry array
리턴 array

setLogger() 공개 메소드

public setLogger ( Psr\Log\LoggerInterface $logger )
$logger Psr\Log\LoggerInterface

setMarkAsRead() 공개 메소드

Set whether articles must be all marked as read.
public setMarkAsRead ( boolean $markAsRead )
$markAsRead boolean

setProducer() 공개 메소드

This method should be called when user has enabled RabbitMQ.
public setProducer ( OldSound\RabbitMqBundle\RabbitMq\ProducerInterface $producer )
$producer OldSound\RabbitMqBundle\RabbitMq\ProducerInterface

setUser() 공개 메소드

Could the current *connected* user or one retrieve by the consumer.
public setUser ( User $user )
$user Wallabag\UserBundle\Entity\User

프로퍼티 상세

$contentProxy 보호되어 있는 프로퍼티

protected $contentProxy

$em 보호되어 있는 프로퍼티

protected $em

$importedEntries 보호되어 있는 프로퍼티

protected $importedEntries

$logger 보호되어 있는 프로퍼티

protected $logger

$markAsRead 보호되어 있는 프로퍼티

protected $markAsRead

$producer 보호되어 있는 프로퍼티

protected $producer

$queuedEntries 보호되어 있는 프로퍼티

protected $queuedEntries

$skippedEntries 보호되어 있는 프로퍼티

protected $skippedEntries

$user 보호되어 있는 프로퍼티

protected $user