@@ -76,47 +76,47 @@ public function start()
76
76
*/
77
77
public function has ($ name )
78
78
{
79
- return $ this ->storage -> getBag ( $ this -> attributeName )->has ($ name );
79
+ return $ this ->getAttributeBag ( )->has ($ name );
80
80
}
81
81
82
82
/**
83
83
* {@inheritdoc}
84
84
*/
85
85
public function get ($ name , $ default = null )
86
86
{
87
- return $ this ->storage -> getBag ( $ this -> attributeName )->get ($ name , $ default );
87
+ return $ this ->getAttributeBag ( )->get ($ name , $ default );
88
88
}
89
89
90
90
/**
91
91
* {@inheritdoc}
92
92
*/
93
93
public function set ($ name , $ value )
94
94
{
95
- $ this ->storage -> getBag ( $ this -> attributeName )->set ($ name , $ value );
95
+ $ this ->getAttributeBag ( )->set ($ name , $ value );
96
96
}
97
97
98
98
/**
99
99
* {@inheritdoc}
100
100
*/
101
101
public function all ()
102
102
{
103
- return $ this ->storage -> getBag ( $ this -> attributeName )->all ();
103
+ return $ this ->getAttributeBag ( )->all ();
104
104
}
105
105
106
106
/**
107
107
* {@inheritdoc}
108
108
*/
109
109
public function replace (array $ attributes )
110
110
{
111
- $ this ->storage -> getBag ( $ this -> attributeName )->replace ($ attributes );
111
+ $ this ->getAttributeBag ( )->replace ($ attributes );
112
112
}
113
113
114
114
/**
115
115
* {@inheritdoc}
116
116
*/
117
117
public function remove ($ name )
118
118
{
119
- return $ this ->storage -> getBag ( $ this -> attributeName )->remove ($ name );
119
+ return $ this ->getAttributeBag ( )->remove ($ name );
120
120
}
121
121
122
122
/**
@@ -142,7 +142,7 @@ public function isStarted()
142
142
*/
143
143
public function getIterator ()
144
144
{
145
- return new \ArrayIterator ($ this ->storage -> getBag ( $ this -> attributeName )->all ());
145
+ return new \ArrayIterator ($ this ->getAttributeBag ( )->all ());
146
146
}
147
147
148
148
/**
@@ -152,7 +152,7 @@ public function getIterator()
152
152
*/
153
153
public function count ()
154
154
{
155
- return count ($ this ->storage -> getBag ( $ this -> attributeName )->all ());
155
+ return count ($ this ->getAttributeBag ( )->all ());
156
156
}
157
157
158
158
/**
@@ -246,4 +246,14 @@ public function getFlashBag()
246
246
{
247
247
return $ this ->getBag ($ this ->flashName );
248
248
}
249
+
250
+ /**
251
+ * Gets the attributebag interface.
252
+ *
253
+ * @return AttributeBagInterface
254
+ */
255
+ private function getAttributeBag ()
256
+ {
257
+ return $ this ->storage ->getBag ($ this ->attributeName );
258
+ }
249
259
}
0 commit comments