PHP 클래스 Scientist\Laboratory

The Laboratory is where the magic takes place. Here we define and conduct our experiments.
파일 보기 프로젝트 열기: daylerees/scientist 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$journals Scientist\Journals\Journal[] Collection of journals to report to.

공개 메소드들

메소드 설명
addJournal ( Scientist\Journals\Journal $journal ) Register a new journal.
experiment ( string $name ) : mixed Start a new experiment.
getJournals ( ) : array Retrieve registers journals.
getReport ( Experiment $experiment ) : Report Run an experiment and return the result.
runExperiment ( Experiment $experiment ) : mixed Run an experiment.
setJournals ( array $journals = [] ) Register a collection of journals.

보호된 메소드들

메소드 설명
reportToJournals ( Experiment $experiment, Report $report ) : void Report experiment result to registered journals.

메소드 상세

addJournal() 공개 메소드

Register a new journal.
public addJournal ( Scientist\Journals\Journal $journal )
$journal Scientist\Journals\Journal

experiment() 공개 메소드

Start a new experiment.
public experiment ( string $name ) : mixed
$name string
리턴 mixed

getJournals() 공개 메소드

Retrieve registers journals.
public getJournals ( ) : array
리턴 array

getReport() 공개 메소드

Run an experiment and return the result.
public getReport ( Experiment $experiment ) : Report
$experiment Experiment
리턴 Report

reportToJournals() 보호된 메소드

Report experiment result to registered journals.
protected reportToJournals ( Experiment $experiment, Report $report ) : void
$experiment Experiment
$report Report
리턴 void

runExperiment() 공개 메소드

Run an experiment.
public runExperiment ( Experiment $experiment ) : mixed
$experiment Experiment
리턴 mixed

setJournals() 공개 메소드

Register a collection of journals.
public setJournals ( array $journals = [] )
$journals array

프로퍼티 상세

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

Collection of journals to report to.
protected Journal[],Scientist\Journals $journals
리턴 Scientist\Journals\Journal[]