PHP Class Newscoop\WebcodeFacade

显示文件 Open project: sourcefabric/newscoop

Protected Properties

Property Type Description
$em
$random

Public Methods

Method Description
__construct ( EntityManager $em, Random $random )
findArticleByWebcode ( string $webcode ) : Newscoop\Entity\Article Find article by webcode
getArticleWebcode ( Article $article ) : string Get article webcode
setArticleWebcode ( Article $article, string $webcode = null ) : void Set article webcode

Private Methods

Method Description
generateWebcode ( ) Generate webcode
getRepository ( ) : Doctrine\ORM\EntityRepository Get webcode repository
isUnique ( string $webcode ) : boolean Test if webcode is unique

Method Details

__construct() public method

public __construct ( EntityManager $em, Random $random )
$em Doctrine\ORM\EntityManager
$random Random

findArticleByWebcode() public method

Find article by webcode
public findArticleByWebcode ( string $webcode ) : Newscoop\Entity\Article
$webcode string
return Newscoop\Entity\Article

getArticleWebcode() public method

Get article webcode
public getArticleWebcode ( Article $article ) : string
$article Newscoop\Entity\Article
return string

setArticleWebcode() public method

Set article webcode
public setArticleWebcode ( Article $article, string $webcode = null ) : void
$article Newscoop\Entity\Article
$webcode string
return void

Property Details

$em protected_oe property

protected $em

$random protected_oe property

protected $random