30 if (!defined(
'PHPEXCEL_ROOT')) {
34 define(
'PHPEXCEL_ROOT', dirname(__FILE__) .
'/../../');
38 require_once PHPEXCEL_ROOT .
'PHPExcel/Style/Border.php';
41 require_once PHPEXCEL_ROOT .
'PHPExcel/IComparable.php';
162 $this->_isSupervisor = $isSupervisor;
182 $this->_left->bindParent($this,
'_left');
183 $this->_right->bindParent($this,
'_right');
184 $this->_top->bindParent($this,
'_top');
185 $this->_bottom->bindParent($this,
'_bottom');
186 $this->_diagonal->bindParent($this,
'_diagonal');
187 $this->_allBorders->bindParent($this,
'_allBorders');
188 $this->_outline->bindParent($this,
'_outline');
189 $this->_inside->bindParent($this,
'_inside');
190 $this->_vertical->bindParent($this,
'_vertical');
191 $this->_horizontal->bindParent($this,
'_horizontal');
203 $this->_parent = $parent;
225 return $this->_parent->getSharedComponent()->getBorders();
235 return $this->_parent->getActiveSheet();
268 return array(
'borders' => $array);
310 if (is_array($pStyles)) {
311 if ($this->_isSupervisor) {
314 if (array_key_exists(
'left', $pStyles)) {
315 $this->
getLeft()->applyFromArray($pStyles[
'left']);
317 if (array_key_exists(
'right', $pStyles)) {
318 $this->
getRight()->applyFromArray($pStyles[
'right']);
320 if (array_key_exists(
'top', $pStyles)) {
321 $this->
getTop()->applyFromArray($pStyles[
'top']);
323 if (array_key_exists(
'bottom', $pStyles)) {
324 $this->
getBottom()->applyFromArray($pStyles[
'bottom']);
326 if (array_key_exists(
'diagonal', $pStyles)) {
327 $this->
getDiagonal()->applyFromArray($pStyles[
'diagonal']);
329 if (array_key_exists(
'diagonaldirection', $pStyles)) {
334 throw new Exception(
"Invalid style array passed.");
391 if (!$this->_isSupervisor) {
392 throw new Exception(
'Can only get pseudo-border for supervisor.');
404 if (!$this->_isSupervisor) {
405 throw new Exception(
'Can only get pseudo-border for supervisor.');
417 if (!$this->_isSupervisor) {
418 throw new Exception(
'Can only get pseudo-border for supervisor.');
430 if (!$this->_isSupervisor) {
431 throw new Exception(
'Can only get pseudo-border for supervisor.');
443 if (!$this->_isSupervisor) {
444 throw new Exception(
'Can only get pseudo-border for supervisor.');
455 if ($this->_isSupervisor) {
471 if ($this->_isSupervisor) {
472 $styleArray = $this->
getStyleArray(array(
'diagonaldirection' => $pValue));
475 $this->_diagonalDirection = $pValue;
486 if ($this->_isSupervisor) {
528 $this->_hashIndex = $value;
535 $vars = get_object_vars($this);
536 foreach ($vars as
$key => $value) {
537 if (is_object($value)) {
538 $this->
$key = clone $value;
540 $this->
$key = $value;