Cell::getAttributes()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
c 3
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * @package    Fuel\Common
4
 * @version    2.0
5
 * @author     Fuel Development Team
6
 * @license    MIT License
7
 * @copyright  2010 - 2015 Fuel Development Team
8
 * @link       http://fuelphp.com
9
 */
10
11
namespace Fuel\Common\Table;
12
13
/**
14
 * Defines a cell of a Row
15
 *
16
 * @package Fuel\Common
17
 *
18
 * @since 2.0
19
 */
20
class Cell
21
{
22
	/**
23
	 * @var mixed The content of the Cell
24
	 */
25
	protected $content;
26
27
	/**
28
	 * @var array Contains the attributes to associate with this table.
29
	 */
30
	protected $attributes = [];
31
32
	/**
33
	 * @param mixed $content
34
	 */
35
	public function __construct($content = null)
36
	{
37
		$this->setContent($content);
38
	}
39
40
	/**
41
	 * Returns the content of the Cell
42
	 *
43
	 * @return mixed
44
	 */
45
	public function getContent()
46
	{
47
		return $this->content;
48
	}
49
50
	/**
51
	 * Sets the content of the Cell
52
	 *
53
	 * @param mixed $content
54
	 *
55
	 * @return $this
56
	 */
57
	public function setContent($content)
58
	{
59
		$this->content = $content;
60
61
		return $this;
62
	}
63
64
	/**
65
	 * Returns the attributes of this Cell
66
	 *
67
	 * @return array
68
	 */
69
	public function getAttributes()
70
	{
71
		return $this->attributes;
72
	}
73
74
	/**
75
	 * Sets the atributes of the Cell
76
	 *
77
	 * @param array $newAttributes
78
	 *
79
	 * @return $this
80
	 */
81
	public function setAttributes(array $newAttributes)
82
	{
83
		$this->attributes = $newAttributes;
84
85
		return $this;
86
	}
87
}
88