2015-10-01 16:02:51 -04:00
|
|
|
<?php
|
2015-11-16 11:40:01 -05:00
|
|
|
/**
|
|
|
|
* Ion
|
|
|
|
*
|
|
|
|
* Building blocks for web development
|
|
|
|
*
|
|
|
|
* @package Ion
|
|
|
|
* @author Timothy J. Warren
|
2016-01-04 16:58:33 -05:00
|
|
|
* @copyright Copyright (c) 2015 - 2016
|
2015-11-16 11:40:01 -05:00
|
|
|
* @license MIT
|
|
|
|
*/
|
2015-10-01 16:02:51 -04:00
|
|
|
|
|
|
|
namespace Aviat\Ion;
|
|
|
|
|
2015-10-05 16:54:25 -04:00
|
|
|
use Aviat\Ion\Type\StringType;
|
2015-10-01 16:02:51 -04:00
|
|
|
|
2015-10-09 22:29:59 -04:00
|
|
|
/**
|
|
|
|
* Trait to add convenience method for creating StringType objects
|
|
|
|
*/
|
2015-10-01 16:02:51 -04:00
|
|
|
trait StringWrapper {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Wrap the String in the Stringy class
|
|
|
|
*
|
|
|
|
* @param string $str
|
2015-10-05 16:54:25 -04:00
|
|
|
* @return StringType
|
2015-10-01 16:02:51 -04:00
|
|
|
*/
|
|
|
|
public function string($str)
|
|
|
|
{
|
2015-10-05 16:54:25 -04:00
|
|
|
return StringType::create($str);
|
2015-10-01 16:02:51 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// End of StringWrapper.php
|