PHPExcel classes » \PHPExcel_Style_Borders

PHPExcel_Style_Borders

category | PHPExcel
package | PHPExcel_Style
copyright | Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

### Methods

## Implement PHP __clone to create a deep clone, not just a shallow copy.

    __clone()

Inherited

inherited_from | \PHPExcel_Style_Supervisor::__clone()

## Create a new PHPExcel_Style_Borders

    __construct(boolean $isSupervisor, boolean $isConditional)

### Parameters

#### $isSupervisor

`boolean`

Flag indicating if this is a supervisor or not Leave this value at default unless you understand exactly what its ramifications are

#### $isConditional

`boolean`

Flag indicating if this is a conditional style or not Leave this value at default unless you understand exactly what its ramifications are

## Apply styles from array

    applyFromArray(array $pStyles) : \PHPExcel_Style_Borders

    $objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray(
            array(
                'bottom'     => array(
                    'style' => PHPExcel_Style_Border::BORDER_DASHDOT,
                    'color' => array(
                        'rgb' => '808080'
                    )
                ),
                'top'     => array(
                    'style' => PHPExcel_Style_Border::BORDER_DASHDOT,
                    'color' => array(
                        'rgb' => '808080'
                    )
                )
            )
    );

    $objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray(
            array(
                'allborders' => array(
                    'style' => PHPExcel_Style_Border::BORDER_DASHDOT,
                    'color' => array(
                        'rgb' => '808080'
                    )
                )
            )
    );

### Parameters

#### $pStyles

`array`

Array containing style information

### Exceptions

`\PHPExcel_Exception` |

### Returns

`\PHPExcel_Style_Borders`

## Bind parent.

    bindParent(\PHPExcel $parent, $parentPropertyName) : \PHPExcel_Style_Supervisor

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::bindParent()

### Parameters

#### $parent

`\PHPExcel`

#### $parentPropertyName

### Returns

`\PHPExcel_Style_Supervisor`

## Get the currently active cell coordinate in currently active sheet.

    getActiveCell() : string

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::getActiveCell()

### Returns

`string`E.g. 'A1'

## Get the currently active sheet.

    getActiveSheet() : \PHPExcel_Worksheet

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::getActiveSheet()

### Returns

`\PHPExcel_Worksheet`

## Get AllBorders (pseudo-border).

    getAllBorders() : \PHPExcel_Style_Border

Only applies to supervisor.

### Exceptions

`\PHPExcel_Exception` |

### Returns

`\PHPExcel_Style_Border`

## Get Bottom

    getBottom() : \PHPExcel_Style_Border

### Returns

`\PHPExcel_Style_Border`

## Get Diagonal

    getDiagonal() : \PHPExcel_Style_Border

### Returns

`\PHPExcel_Style_Border`

## Get DiagonalDirection

    getDiagonalDirection() : int

### Returns

`int`

## Get hash code

    getHashCode() : string

### Returns

`string`Hash code

## Get Horizontal (pseudo-border).

    getHorizontal() : \PHPExcel_Style_Border

Only applies to supervisor.

### Exceptions

`\PHPExcel_Exception` |

### Returns

`\PHPExcel_Style_Border`

## Get Inside (pseudo-border).

    getInside() : boolean

Only applies to supervisor.

### Exceptions

`\PHPExcel_Exception` |

### Returns

`boolean`

## Is this a supervisor or a cell style component?

    getIsSupervisor() : boolean

Inherited

inherited_from | \PHPExcel_Style_Supervisor::getIsSupervisor()

### Returns

`boolean`

## Get Left

    getLeft() : \PHPExcel_Style_Border

### Returns

`\PHPExcel_Style_Border`

## Get Outline (pseudo-border).

    getOutline() : boolean

Only applies to supervisor.

### Exceptions

`\PHPExcel_Exception` |

### Returns

`boolean`

## Get Right

    getRight() : \PHPExcel_Style_Border

### Returns

`\PHPExcel_Style_Border`

## Get the currently active cell coordinate in currently active sheet.

    getSelectedCells() : string

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::getSelectedCells()

### Returns

`string`E.g. 'A1'

## Get the shared style component for the currently active cell in currently active sheet.

    getSharedComponent() : \PHPExcel_Style_Borders

Only used for style supervisor

### Returns

`\PHPExcel_Style_Borders`

## Build style array from subcomponents

    getStyleArray(array $array) : array

### Parameters

#### $array

`array`

### Returns

`array`

## Get Top

    getTop() : \PHPExcel_Style_Border

### Returns

`\PHPExcel_Style_Border`

## Get Vertical (pseudo-border).

    getVertical() : \PHPExcel_Style_Border

Only applies to supervisor.

### Exceptions

`\PHPExcel_Exception` |

### Returns

`\PHPExcel_Style_Border`

## Set DiagonalDirection

    setDiagonalDirection(int $pValue) : \PHPExcel_Style_Borders

### Parameters

#### $pValue

`int`

### Returns

`\PHPExcel_Style_Borders`

### Properties

##

    $_allBorders : \PHPExcel_Style_Border

Only applies to supervisor.

##

    $_bottom : \PHPExcel_Style_Border

##

    $_diagonal : \PHPExcel_Style_Border

##

    $_diagonalDirection : int

##

    $_horizontal : \PHPExcel_Style_Border

Only applies to supervisor.

##

    $_inside : \PHPExcel_Style_Border

Only applies to supervisor.

##

    $_isSupervisor : boolean

Inherited

inherited_from | \PHPExcel_Style_Supervisor::$$_isSupervisor

##

    $_left : \PHPExcel_Style_Border

##

    $_outline : \PHPExcel_Style_Border

Only applies to supervisor.

##

    $_parent : \PHPExcel_Style

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::$$_parent

##

    $_right : \PHPExcel_Style_Border

##

    $_top : \PHPExcel_Style_Border

##

    $_vertical : \PHPExcel_Style_Border

Only applies to supervisor.

### Constants

## DIAGONAL_BOTH

    DIAGONAL_BOTH

## DIAGONAL_DOWN

    DIAGONAL_DOWN

## DIAGONAL_NONE

    DIAGONAL_NONE

## DIAGONAL_UP

    DIAGONAL_UP