PHP 클래스 Wallabag\CoreBundle\Helper\ContentProxy

파일 보기 프로젝트 열기: wallabag/wallabag 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$graby
$logger
$mimeGuesser
$tagRepository
$tagger

공개 메소드들

메소드 설명
__construct ( Graby $graby, RuleBasedTagger $tagger, TagRepository $tagRepository, Psr\Log\LoggerInterface $logger )
assignTagsToEntry ( Entry $entry, array | string $tags, array $entitiesReady = [] ) Assign some tags to an entry.
updateEntry ( Entry $entry, string $url, array $content = [] ) : Entry Fetch content using graby and hydrate given entry with results information.

비공개 메소드들

메소드 설명
validateContent ( array $content ) : boolean Validate that the given content as enough value to be used instead of fetch the content from the url.

메소드 상세

__construct() 공개 메소드

public __construct ( Graby $graby, RuleBasedTagger $tagger, TagRepository $tagRepository, Psr\Log\LoggerInterface $logger )
$graby Graby\Graby
$tagger RuleBasedTagger
$tagRepository Wallabag\CoreBundle\Repository\TagRepository
$logger Psr\Log\LoggerInterface

assignTagsToEntry() 공개 메소드

Assign some tags to an entry.
public assignTagsToEntry ( Entry $entry, array | string $tags, array $entitiesReady = [] )
$entry Wallabag\CoreBundle\Entity\Entry
$tags array | string An array of tag or a string coma separated of tag
$entitiesReady array Entities from the EntityManager which are persisted but not yet flushed It is mostly to fix duplicate tag on import @see http://stackoverflow.com/a/7879164/569101

updateEntry() 공개 메소드

In case we couldn't find content, we'll try to use Open Graph data. We can also force the content, in case of an import from the v1 for example, so the function won't fetch the content from the website but rather use information given with the $content parameter.
public updateEntry ( 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

프로퍼티 상세

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

protected $graby

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

protected $logger

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

protected $mimeGuesser

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

protected $tagRepository

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

protected $tagger