1: <?php
2: /**
3: * Hard type support
4: * For when you absolutely want to know what you are getting
5: *
6: * @author Ashley Kitson <akitson@zf4.biz>
7: * @copyright Ashley Kitson, UK, 2014
8: * @licence GPL V3 or later : http://www.gnu.org/licenses/gpl.html
9: */
10:
11: namespace chippyash\Type\String;
12:
13: use \chippyash\Type\AbstractType;
14:
15: /**
16: * String Type
17: */
18: class StringType extends AbstractType
19: {
20: /**
21: * Return correctly typed value for this type
22: *
23: * @param mixed $value
24: *
25: * @return string
26: */
27: protected function typeOf($value)
28: {
29: return (string) $value;
30: }
31: }
32: