PHP Class Knp\Bundle\KnpBundlesBundle\Entity\Bundle

Exibir arquivo Open project: KnpLabs/KnpBundles Class Usage Examples

Protected Properties

Property Type Description
$activities Doctrine\Common\Collections\Collection
$canonicalConfig The bundle canonical configuration yaml extracted from bundle's repo
$composerName Composer name
$contributors Doctrine\Common\Collections\Collection Developers who contributed to the Repo
$createdAt Repo creation date (on this website)
$description Repo description
$favorers Doctrine\Common\Collections\Collection Developers who has favorited the bundle
$homepage The website url, if any
$id
$indexedAt Last indexing time.
$isFork True if the Repo is a fork
$keywords Doctrine\Common\Collections\Collection Bundle keywords
$lastCheckAt Date of the last successful GitHub check
$lastCommitAt Date of the last Git commit
$lastTweetedAt Date when bundle was tweeted from knplabs account.
$license The bundle license text extracted from source code
$licenseType The bundle license type extracted from composer.json
$name Repo name, e.g. "MarkdownBundle" Like in GitHub, this name is not unique
$nbFavorers
$nbFollowers Number of GitHub followers
$nbForks Number of GitHub forks
$nbRecommenders
$owner Doctrine\Common\Collections\Collection Owner of the bundle
$ownerName The name of the owner who owns this bundle This value is redundant with the name of the referenced Owner, for performance reasons
$ownerType The type of the owner who owns this bundle This value is redundant with the class of the referenced Owner, for performance reasons
$readme The bundle readme text extracted from source code
$recommenders Doctrine\Common\Collections\Collection Developers recommending the bundle
$score Internal score of the Repo, based on several indicators Defines the Repo position in lists and searches
$scoreDetails array Latest score's details
$scores Doctrine\Common\Collections\Collection Internal scores
$state Status of bundle
$travisCiBuildStatus Travis Ci last build status
$trend1 Trend over the last day. Max is better.
$updatedAt Repo update date (on this website)
$usesTravisCi True if the Repo uses Travis CI
$versionsHistory Bundle versions history

Public Methods

Method Description
__construct ( null | string $fullName = null )
__toString ( )
addActivity ( Activity $activity )
addFavorer ( Developer $developer )
addKeyword ( Keyword $keyword )
addRecommender ( Developer $developer )
addScoreDetail ( $name, $value )
countKeywords ( ) : integer
fromArray ( array $data )
getActivities ( null | integer $page = null, integer $limit = 15 ) : Traversable Get activities
getCanonicalConfig ( ) : string Get canonicalConfig
getClass ( )
getComposerName ( ) : string Get Composer name
getContributorNames ( )
getContributors ( null | integer $page = null, integer $limit = 20 ) : Traversable Get contributors
getCreatedAt ( ) : DateTime Get the bundle creation date
getDaysSinceLastCommit ( ) : integer Returns the number of days elapsed since the last commit on the master branch
getDescription ( null | integer $cutAfter = null ) : string Get description
getFavorers ( null | integer $page = null, integer $limit = 20 ) : Traversable
getFullName ( ) : string Get full name, including ownerName
getGitHubUrl ( ) : string Get the GitHub url of this bundle
getGitUrl ( ) : string Get the Git repo url
getHomepage ( ) : string Get homepage
getId ( ) : string Get id
getIndexedAt ( ) : DateTime Get indexedAt
getIsFork ( ) : boolean Get isFork
getKeywords ( ) : Doctrine\Common\Collections\Collection
getLastCheckAt ( ) : DateTime Get the date of last check
getLastCommitAt ( ) : DateTime Get the date of the last commit
getLastTweetedAt ( ) : null | DateTime Get lastTweetedAt
getLatestActivities ( $type = Activity::ACTIVITY_TYPE_COMMIT )
getLatestScoreDetails ( )
getLicense ( ) : string Get license data
getLicenseType ( ) : string Get license type
getName ( ) : string Get name
getNbContributors ( ) : integer Get the number of contributors
getNbFavorers ( )
getNbFollowers ( ) : integer Get followers
getNbForks ( ) : integer Get forks
getNbRecommenders ( )
getOwner ( ) : Owner
getOwnerName ( ) : string Get ownername
getOwnerType ( ) : string
getPackagistUrl ( ) : string Get the Packagist url of this repo
getReadme ( ) : string Get readme
getRecommenders ( null | integer $page = null, integer $limit = 20 ) : Traversable
getScore ( ) : integer Get score
getScoreDetails ( ) Returns details about the bundle's score
getScores ( integer $limit = null ) : array Get all historical scores indexed by date
getShortName ( ) : string Get the first part of the name, without Bundle
getState ( ) : string Get the status of bundle
getStatusHash ( ) : string Unique string which shows current status of the bundle
getSymfonyVersions ( ) : array | null Get required versions of Symfony from bundle Versions History
getTravisCiBuildStatus ( ) : string Get Travis Ci last build status
getTravisUrl ( ) : string Get the Travis Ci url of this bundle
getTrend1 ( ) : integer Get the trend over the last day
getUpdatedAt ( ) : DateTime Get the bundle update date
getUsesTravisCi ( ) : boolean Get whether bundle uses Travis CI
getVersionsHistory ( ) : array Get bundle versions history
hasChanges ( ) : boolean
hasKeyword ( Keyword $keyword ) : boolean
isInitialized ( )
isOwnerOrContributor ( Owner $owner ) : boolean
markAsCreated ( )
markAsUpdated ( )
recalculateScore ( ) Calculate the score of this bundle based on several factors.
removeFavorer ( Developer $developer )
removeRecommender ( Developer $developer )
setCanonicalConfig ( $canonicalConfig ) Set canonicalConfig
setComposerName ( $name ) Set Composer name
setContributors ( array $contributors ) Set contributors
setCreatedAt ( DateTime $createdAt ) Set the bundle creation date
setDescription ( string $description ) Set description
setHomepage ( string $homepage ) Set homepage
setIndexedAt ( DateTime $indexedAt ) Set indexedAt
setIsFork ( boolean $isFork ) Set isFork
setLastCheckAt ( DateTime $lastCheckAt ) Set the date of last check
setLastCommitAt ( DateTime $lastCommitAt ) Set lastCommitAt
setLastTweetedAt ( DateTime $lastTweetedAt ) Set lastTweetedAt
setLicense ( string $license ) Set license data
setLicenseType ( string $license ) Set license type
setName ( $name ) Set name
setNbFavorers ( integer $nbFavorers )
setNbFollowers ( integer $nbFollowers ) Set followers
setNbForks ( integer $nbForks ) Set forks
setNbRecommenders ( integer $nbRecommenders )
setOwner ( Owner $owner )
setOwnerName ( string $ownerName ) Set ownerName
setReadme ( string $readme ) Set readme
setScore ( integer $score ) Set score
setScoreDetails ( array $details )
setState ( $state ) Set status of bundle
setTravisCiBuildStatus ( string $status ) Set Travis Ci last build status
setUsesTravisCi ( boolean $uses ) Set whether bundle uses Travis CI
setVersionsHistory ( array $versions ) Set bundle versions history
toBigArray ( ) : array Get an array representing the Repo
toSmallArray ( )
updateScore ( integer $points = 1 ) Updates bundle score with given amount of points

Method Details

__construct() public method

public __construct ( null | string $fullName = null )
$fullName null | string

__toString() public method

public __toString ( )

addActivity() public method

public addActivity ( Activity $activity )
$activity Activity

addFavorer() public method

public addFavorer ( Developer $developer )
$developer Developer

addKeyword() public method

public addKeyword ( Keyword $keyword )
$keyword Keyword

addRecommender() public method

public addRecommender ( Developer $developer )
$developer Developer

addScoreDetail() public method

public addScoreDetail ( $name, $value )

countKeywords() public method

public countKeywords ( ) : integer
return integer Total nb of keywords for this bundle

fromArray() public method

public fromArray ( array $data )
$data array

getActivities() public method

Get activities
public getActivities ( null | integer $page = null, integer $limit = 15 ) : Traversable
$page null | integer
$limit integer
return Traversable

getCanonicalConfig() public method

Get canonicalConfig
public getCanonicalConfig ( ) : string
return string

getClass() public method

public getClass ( )

getComposerName() public method

Get Composer name
public getComposerName ( ) : string
return string

getContributorNames() public method

public getContributorNames ( )

getContributors() public method

Get contributors
public getContributors ( null | integer $page = null, integer $limit = 20 ) : Traversable
$page null | integer
$limit integer
return Traversable

getCreatedAt() public method

Get the bundle creation date
public getCreatedAt ( ) : DateTime
return DateTime

getDaysSinceLastCommit() public method

Returns the number of days elapsed since the last commit on the master branch
public getDaysSinceLastCommit ( ) : integer
return integer

getDescription() public method

Get description
public getDescription ( null | integer $cutAfter = null ) : string
$cutAfter null | integer
return string

getFavorers() public method

public getFavorers ( null | integer $page = null, integer $limit = 20 ) : Traversable
$page null | integer
$limit integer
return Traversable

getFullName() public method

Get full name, including ownerName
public getFullName ( ) : string
return string

getGitHubUrl() public method

Get the GitHub url of this bundle
public getGitHubUrl ( ) : string
return string

getGitUrl() public method

Get the Git repo url
public getGitUrl ( ) : string
return string

getHomepage() public method

Get homepage
public getHomepage ( ) : string
return string

getId() public method

Get id
public getId ( ) : string
return string

getIndexedAt() public method

Get indexedAt
public getIndexedAt ( ) : DateTime
return DateTime

getIsFork() public method

Get isFork
public getIsFork ( ) : boolean
return boolean

getKeywords() public method

public getKeywords ( ) : Doctrine\Common\Collections\Collection
return Doctrine\Common\Collections\Collection

getLastCheckAt() public method

Get the date of last check
public getLastCheckAt ( ) : DateTime
return DateTime

getLastCommitAt() public method

Get the date of the last commit
public getLastCommitAt ( ) : DateTime
return DateTime

getLastTweetedAt() public method

Get lastTweetedAt
public getLastTweetedAt ( ) : null | DateTime
return null | DateTime

getLatestActivities() public method

public getLatestActivities ( $type = Activity::ACTIVITY_TYPE_COMMIT )

getLatestScoreDetails() public method

getLicense() public method

Get license data
public getLicense ( ) : string
return string

getLicenseType() public method

Get license type
public getLicenseType ( ) : string
return string

getName() public method

Get name
public getName ( ) : string
return string

getNbContributors() public method

Get the number of contributors
public getNbContributors ( ) : integer
return integer

getNbFavorers() public method

public getNbFavorers ( )

getNbFollowers() public method

Get followers
public getNbFollowers ( ) : integer
return integer

getNbForks() public method

Get forks
public getNbForks ( ) : integer
return integer

getNbRecommenders() public method

public getNbRecommenders ( )

getOwner() public method

public getOwner ( ) : Owner
return Owner

getOwnerName() public method

Get ownername
public getOwnerName ( ) : string
return string

getOwnerType() public method

public getOwnerType ( ) : string
return string

getPackagistUrl() public method

Get the Packagist url of this repo
public getPackagistUrl ( ) : string
return string

getReadme() public method

Get readme
public getReadme ( ) : string
return string

getRecommenders() public method

public getRecommenders ( null | integer $page = null, integer $limit = 20 ) : Traversable
$page null | integer
$limit integer
return Traversable

getScore() public method

Get score
public getScore ( ) : integer
return integer

getScoreDetails() public method

Returns details about the bundle's score
public getScoreDetails ( )

getScores() public method

Get all historical scores indexed by date
public getScores ( integer $limit = null ) : array
$limit integer
return array

getShortName() public method

Get the first part of the name, without Bundle
public getShortName ( ) : string
return string

getState() public method

Get the status of bundle
public getState ( ) : string
return string

getStatusHash() public method

Unique string which shows current status of the bundle
public getStatusHash ( ) : string
return string

getSymfonyVersions() public method

Get required versions of Symfony from bundle Versions History
public getSymfonyVersions ( ) : array | null
return array | null

getTravisCiBuildStatus() public method

Get Travis Ci last build status
public getTravisCiBuildStatus ( ) : string
return string

getTravisUrl() public method

Get the Travis Ci url of this bundle
public getTravisUrl ( ) : string
return string

getTrend1() public method

Get the trend over the last day
public getTrend1 ( ) : integer
return integer

getUpdatedAt() public method

Get the bundle update date
public getUpdatedAt ( ) : DateTime
return DateTime

getUsesTravisCi() public method

Get whether bundle uses Travis CI
public getUsesTravisCi ( ) : boolean
return boolean

getVersionsHistory() public method

Get bundle versions history
public getVersionsHistory ( ) : array
return array

hasChanges() public method

public hasChanges ( ) : boolean
return boolean

hasKeyword() public method

public hasKeyword ( Keyword $keyword ) : boolean
$keyword Keyword
return boolean

isInitialized() public method

public isInitialized ( )

isOwnerOrContributor() public method

public isOwnerOrContributor ( Owner $owner ) : boolean
$owner Owner
return boolean

markAsCreated() public method

public markAsCreated ( )

markAsUpdated() public method

public markAsUpdated ( )

recalculateScore() public method

The score is used as the default sort field in many places. #TODO discuss me, improve me
public recalculateScore ( )

removeFavorer() public method

public removeFavorer ( Developer $developer )
$developer Developer

removeRecommender() public method

public removeRecommender ( Developer $developer )
$developer Developer

setCanonicalConfig() public method

Set canonicalConfig
public setCanonicalConfig ( $canonicalConfig )
$canonicalConfig

setComposerName() public method

Set Composer name
public setComposerName ( $name )

setContributors() public method

Set contributors
public setContributors ( array $contributors )
$contributors array

setCreatedAt() public method

Set the bundle creation date
public setCreatedAt ( DateTime $createdAt )
$createdAt DateTime

setDescription() public method

Set description
public setDescription ( string $description )
$description string

setHomepage() public method

Set homepage
public setHomepage ( string $homepage )
$homepage string

setIndexedAt() public method

Set indexedAt
public setIndexedAt ( DateTime $indexedAt )
$indexedAt DateTime

setIsFork() public method

Set isFork
public setIsFork ( boolean $isFork )
$isFork boolean

setLastCheckAt() public method

Set the date of last check
public setLastCheckAt ( DateTime $lastCheckAt )
$lastCheckAt DateTime

setLastCommitAt() public method

Set lastCommitAt
public setLastCommitAt ( DateTime $lastCommitAt )
$lastCommitAt DateTime

setLastTweetedAt() public method

Set lastTweetedAt
public setLastTweetedAt ( DateTime $lastTweetedAt )
$lastTweetedAt DateTime

setLicense() public method

Set license data
public setLicense ( string $license )
$license string

setLicenseType() public method

Set license type
public setLicenseType ( string $license )
$license string

setName() public method

Set name
public setName ( $name )

setNbFavorers() public method

public setNbFavorers ( integer $nbFavorers )
$nbFavorers integer

setNbFollowers() public method

Set followers
public setNbFollowers ( integer $nbFollowers )
$nbFollowers integer

setNbForks() public method

Set forks
public setNbForks ( integer $nbForks )
$nbForks integer

setNbRecommenders() public method

public setNbRecommenders ( integer $nbRecommenders )
$nbRecommenders integer

setOwner() public method

public setOwner ( Owner $owner )
$owner Owner

setOwnerName() public method

Set ownerName
public setOwnerName ( string $ownerName )
$ownerName string

setReadme() public method

Set readme
public setReadme ( string $readme )
$readme string

setScore() public method

Set score
public setScore ( integer $score )
$score integer

setScoreDetails() public method

public setScoreDetails ( array $details )
$details array

setState() public method

Set status of bundle
public setState ( $state )

setTravisCiBuildStatus() public method

Set Travis Ci last build status
public setTravisCiBuildStatus ( string $status )
$status string

setUsesTravisCi() public method

Set whether bundle uses Travis CI
public setUsesTravisCi ( boolean $uses )
$uses boolean

setVersionsHistory() public method

Set bundle versions history
public setVersionsHistory ( array $versions )
$versions array

toBigArray() public method

Get an array representing the Repo
public toBigArray ( ) : array
return array

toSmallArray() public method

public toSmallArray ( )

updateScore() public method

Updates bundle score with given amount of points
public updateScore ( integer $points = 1 )
$points integer

Property Details

$activities protected_oe property

protected Collection,Doctrine\Common\Collections $activities
return Doctrine\Common\Collections\Collection

$canonicalConfig protected_oe property

The bundle canonical configuration yaml extracted from bundle's repo
protected $canonicalConfig

$composerName protected_oe property

Composer name
protected $composerName

$contributors protected_oe property

Developers who contributed to the Repo
protected Collection,Doctrine\Common\Collections $contributors
return Doctrine\Common\Collections\Collection

$createdAt protected_oe property

Repo creation date (on this website)
protected $createdAt

$description protected_oe property

Repo description
protected $description

$favorers protected_oe property

Developers who has favorited the bundle
protected Collection,Doctrine\Common\Collections $favorers
return Doctrine\Common\Collections\Collection

$homepage protected_oe property

The website url, if any
protected $homepage

$id protected_oe property

protected $id

$indexedAt protected_oe property

Last indexing time.
protected $indexedAt

$isFork protected_oe property

True if the Repo is a fork
protected $isFork

$keywords protected_oe property

Bundle keywords
protected Collection,Doctrine\Common\Collections $keywords
return Doctrine\Common\Collections\Collection

$lastCheckAt protected_oe property

Date of the last successful GitHub check
protected $lastCheckAt

$lastCommitAt protected_oe property

Date of the last Git commit
protected $lastCommitAt

$lastTweetedAt protected_oe property

Date when bundle was tweeted from knplabs account.
protected $lastTweetedAt

$license protected_oe property

The bundle license text extracted from source code
protected $license

$licenseType protected_oe property

The bundle license type extracted from composer.json
protected $licenseType

$name protected_oe property

Repo name, e.g. "MarkdownBundle" Like in GitHub, this name is not unique
protected $name

$nbFavorers protected_oe property

protected $nbFavorers

$nbFollowers protected_oe property

Number of GitHub followers
protected $nbFollowers

$nbForks protected_oe property

Number of GitHub forks
protected $nbForks

$nbRecommenders protected_oe property

protected $nbRecommenders

$owner protected_oe property

Owner of the bundle
protected Collection,Doctrine\Common\Collections $owner
return Doctrine\Common\Collections\Collection

$ownerName protected_oe property

The name of the owner who owns this bundle This value is redundant with the name of the referenced Owner, for performance reasons
protected $ownerName

$ownerType protected_oe property

The type of the owner who owns this bundle This value is redundant with the class of the referenced Owner, for performance reasons
protected $ownerType

$readme protected_oe property

The bundle readme text extracted from source code
protected $readme

$recommenders protected_oe property

Developers recommending the bundle
protected Collection,Doctrine\Common\Collections $recommenders
return Doctrine\Common\Collections\Collection

$score protected_oe property

Internal score of the Repo, based on several indicators Defines the Repo position in lists and searches
protected $score

$scoreDetails protected_oe property

Latest score's details
protected array $scoreDetails
return array

$scores protected_oe property

Internal scores
protected Collection,Doctrine\Common\Collections $scores
return Doctrine\Common\Collections\Collection

$state protected_oe property

Status of bundle
protected $state

$travisCiBuildStatus protected_oe property

Travis Ci last build status
protected $travisCiBuildStatus

$trend1 protected_oe property

Trend over the last day. Max is better.
protected $trend1

$updatedAt protected_oe property

Repo update date (on this website)
protected $updatedAt

$usesTravisCi protected_oe property

True if the Repo uses Travis CI
protected $usesTravisCi

$versionsHistory protected_oe property

Bundle versions history
protected $versionsHistory