/** * Flo constructor * * @param int $id Workflow id in database. */ public function __construct($id) { $this->workflow = Workflow::model()->findByPk($id); $this->bootstrapped = fluent(); if (!$this->workflow) { return; } $this->bootstrapped->set('workflow', true); $this->fill($this->workflow->attributes); }