Skip to content

Commit

Permalink
PHPOffice#129 : Gridlines core code and PowerPoint2007 writer
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Mar 2, 2016
1 parent a93d525 commit b957fb9
Show file tree
Hide file tree
Showing 4 changed files with 274 additions and 208 deletions.
Empty file removed samples/results/.gitkeep
Empty file.
50 changes: 50 additions & 0 deletions src/PhpPresentation/Shape/Chart/Axis.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@
namespace PhpOffice\PhpPresentation\Shape\Chart;

use PhpOffice\PhpPresentation\ComparableInterface;
use PhpPresentation\Shape\Chart\Gridlines;

/**
* \PhpOffice\PhpPresentation\Shape\Chart\Axis
*/
class Axis implements ComparableInterface
{
const AXIS_X = 'x';
const AXIS_Y = 'y';

/**
* Title
*
Expand All @@ -38,6 +42,16 @@ class Axis implements ComparableInterface
*/
private $formatCode = '';

/**
* @var Gridlines
*/
protected $majorGridlines;

/**
* @var Gridlines
*/
protected $minorGridlines;

/**
* Create a new \PhpOffice\PhpPresentation\Shape\Chart\Axis instance
*
Expand Down Expand Up @@ -94,6 +108,42 @@ public function setFormatCode($value = '')
return $this;
}

/**
* @return Gridlines
*/
public function getMajorGridlines()
{
return $this->majorGridlines;
}

/**
* @param Gridlines $majorGridlines
* @return Axis
*/
public function setMajorGridlines(Gridlines $majorGridlines)
{
$this->majorGridlines = $majorGridlines;
return $this;
}

/**
* @return Gridlines
*/
public function getMinorGridlines()
{
return $this->minorGridlines;
}

/**
* @param Gridlines $minorGridlines
* @return Axis
*/
public function setMinorGridlines(Gridlines $minorGridlines)
{
$this->minorGridlines = $minorGridlines;
return $this;
}

/**
* Get hash code
*
Expand Down
40 changes: 40 additions & 0 deletions src/PhpPresentation/Shape/Chart/Gridlines.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
/**
* Created by PhpStorm.
* User: lefevre_f
* Date: 02/03/2016
* Time: 14:25
*/

namespace PhpPresentation\Shape\Chart;

class Gridlines
{
/**
* @var Outline
*/
protected $outline;

public function __construct()
{
$this->outline = new Outline();
}

/**
* @return Outline
*/
public function getOutline()
{
return $this->outline;
}

/**
* @param Outline $outline
* @return Gridlines
*/
public function setOutline(Outline $outline)
{
$this->outline = $outline;
return $this;
}
}
Loading

0 comments on commit b957fb9

Please sign in to comment.