Ejemplo n.º 1
0
 /**
  * @param $key
  *
  * @return mixed
  */
 function get($key)
 {
     assert($this->offsetExists($key));
     /**
      * @var Pair $pair
      */
     $pair = $this->avl->get(new Pair($key, null));
     return $pair->second;
 }
Ejemplo n.º 2
0
 /**
  * @param $key
  *
  * @return mixed
  * @throws TypeException when the $key is not the correct type.
  * @throws KeyException when the $key is not the correct type.
  */
 function get($key)
 {
     if (!$this->offsetExists($key)) {
         throw new KeyException();
     }
     /**
      * @var Pair $pair
      */
     $pair = $this->avl->get(new Pair($key, null));
     return $pair->second;
 }