示例#1
0
 function array_key_of(array $set, $match)
 {
     return Hash::keyOf($set, $match);
 }
示例#2
0
 /**
  * Test that keyOf() returns the key name based on the provided value; will drill down.
  */
 public function testKeyOf()
 {
     $data = $this->expanded;
     $this->assertEquals(null, Hash::keyOf($data, 'fakeValue'));
     $this->assertEquals('boolean', Hash::keyOf($data, true));
     $this->assertEquals('one.two.three.depth', Hash::keyOf($data, 3));
 }