protected function getSkeleton($name)
 {
     $skeleton = new Skeleton($this->getSkeletonPath('entity'));
     $name = S::upperCamelize($name);
     $skeleton->entity_name = $name;
     $skeleton->table = Inflector::pluralize(S::replace(S::dasherize($name), '-', '_'));
     return $skeleton;
 }
示例#2
0
 /**
  * @dataProvider replaceProvider()
  */
 public function testReplace($expected, $str, $search, $replacement, $encoding = null)
 {
     $result = S::replace($str, $search, $replacement, $encoding);
     $this->assertInternalType('string', $result);
     $this->assertEquals($expected, $result);
 }
示例#3
0
 public function replace($string, $search, $replacement)
 {
     return Stringy::replace($string, $search, $replacement);
 }
 public function index($value, $params = array())
 {
     return Stringy::replace($value, array_get($params, 0), array_get($params, 1));
 }