コード例 #1
0
ファイル: Transcribe.php プロジェクト: rougin/transcribe
 /**
  * Gets the specified text from the list of defined words in the file.
  *
  * @param  string $string
  * @return string
  */
 public function getText($string = '')
 {
     $multiArray = new MultiArray($this->vocabulary);
     $result = $multiArray->get($string);
     return is_string($result) ? $result : $string;
 }
コード例 #2
0
ファイル: MultiArrayTest.php プロジェクト: tebru/multi-array
 public function testAllNewKeys()
 {
     $array = $this->getMultiArray();
     $jsonObject = new MultiArray($array);
     $jsonObject->set('test.test2.test3', 'test');
     $this->assertEquals('test', $jsonObject->get('test.test2.test3'));
 }