/** * Create a new Style * * @param boolean $isSupervisor */ public function __construct($isSupervisor = false) { // Supervisor? $this->_isSupervisor = $isSupervisor; // Initialise values $this->_conditionalStyles = array(); $this->_font = new Style_Font($isSupervisor); $this->_fill = new Style_Fill($isSupervisor); $this->_borders = new Style_Borders($isSupervisor); $this->_alignment = new Style_Alignment($isSupervisor); $this->_numberFormat = new Style_NumberFormat($isSupervisor); $this->_protection = new Style_Protection($isSupervisor); // bind parent if we are a supervisor if ($isSupervisor) { $this->_font->bindParent($this); $this->_fill->bindParent($this); $this->_borders->bindParent($this); $this->_alignment->bindParent($this); $this->_numberFormat->bindParent($this); $this->_protection->bindParent($this); } }