コード例 #1
0
ファイル: ItemTest.php プロジェクト: sqrt-pro/db
 function testMakeNames()
 {
     $this->assertEquals('getHelloThere', \SQRT\DB\Item::MakeGetterName('hello_there'), 'Геттер');
     $this->assertEquals('setHelloThere', \SQRT\DB\Item::MakeSetterName('hello_there'), 'Сеттер');
 }
コード例 #2
0
ファイル: Schema.php プロジェクト: sqrt-pro/db
 protected function makeItemSetter($col)
 {
     return "  /** @return static */\n" . "  public function " . Item::MakeSetterName($col) . "(\${$col})\n" . "  {\n" . "    return \$this->set('{$col}', \${$col});\n" . "  }";
 }