Commit f869a65a authored by Jeremy Mikola's avatar Jeremy Mikola Committed by Katherine Walker

Add doc blocks for disabled TypeMapArrayIterator methods

parent 16aea91d
...@@ -47,11 +47,23 @@ class TypeMapArrayIterator extends ArrayIterator ...@@ -47,11 +47,23 @@ class TypeMapArrayIterator extends ArrayIterator
$this->typeMap = $typeMap; $this->typeMap = $typeMap;
} }
/**
* Not supported.
*
* @see http://php.net/arrayiterator.append
* @throws BadMethodCallException
*/
public function append($value) public function append($value)
{ {
throw BadMethodCallException::classIsImmutable(__CLASS__); throw BadMethodCallException::classIsImmutable(__CLASS__);
} }
/**
* Not supported.
*
* @see http://php.net/arrayiterator.asort
* @throws BadMethodCallException
*/
public function asort() public function asort()
{ {
throw BadMethodCallException::classIsImmutable(__CLASS__); throw BadMethodCallException::classIsImmutable(__CLASS__);
...@@ -68,16 +80,34 @@ class TypeMapArrayIterator extends ArrayIterator ...@@ -68,16 +80,34 @@ class TypeMapArrayIterator extends ArrayIterator
return \MongoDB\apply_type_map_to_document(parent::current(), $this->typeMap); return \MongoDB\apply_type_map_to_document(parent::current(), $this->typeMap);
} }
/**
* Not supported.
*
* @see http://php.net/arrayiterator.ksort
* @throws BadMethodCallException
*/
public function ksort() public function ksort()
{ {
throw BadMethodCallException::classIsImmutable(__CLASS__); throw BadMethodCallException::classIsImmutable(__CLASS__);
} }
/**
* Not supported.
*
* @see http://php.net/arrayiterator.natcasesort
* @throws BadMethodCallException
*/
public function natcasesort() public function natcasesort()
{ {
throw BadMethodCallException::classIsImmutable(__CLASS__); throw BadMethodCallException::classIsImmutable(__CLASS__);
} }
/**
* Not supported.
*
* @see http://php.net/arrayiterator.natsort
* @throws BadMethodCallException
*/
public function natsort() public function natsort()
{ {
throw BadMethodCallException::classIsImmutable(__CLASS__); throw BadMethodCallException::classIsImmutable(__CLASS__);
...@@ -87,6 +117,7 @@ class TypeMapArrayIterator extends ArrayIterator ...@@ -87,6 +117,7 @@ class TypeMapArrayIterator extends ArrayIterator
* Return the value from the provided offset with the type map applied. * Return the value from the provided offset with the type map applied.
* *
* @see http://php.net/arrayiterator.offsetget * @see http://php.net/arrayiterator.offsetget
* @param mixed $offset
* @return array|object * @return array|object
*/ */
public function offsetGet($offset) public function offsetGet($offset)
...@@ -94,21 +125,45 @@ class TypeMapArrayIterator extends ArrayIterator ...@@ -94,21 +125,45 @@ class TypeMapArrayIterator extends ArrayIterator
return \MongoDB\apply_type_map_to_document(parent::offsetGet($offset), $this->typeMap); return \MongoDB\apply_type_map_to_document(parent::offsetGet($offset), $this->typeMap);
} }
/**
* Not supported.
*
* @see http://php.net/arrayiterator.offsetset
* @throws BadMethodCallException
*/
public function offsetSet($index, $newval) public function offsetSet($index, $newval)
{ {
throw BadMethodCallException::classIsImmutable(__CLASS__); throw BadMethodCallException::classIsImmutable(__CLASS__);
} }
/**
* Not supported.
*
* @see http://php.net/arrayiterator.offsetunset
* @throws BadMethodCallException
*/
public function offsetUnset($index) public function offsetUnset($index)
{ {
throw BadMethodCallException::classIsImmutable(__CLASS__); throw BadMethodCallException::classIsImmutable(__CLASS__);
} }
/**
* Not supported.
*
* @see http://php.net/arrayiterator.uasort
* @throws BadMethodCallException
*/
public function uasort($cmp_function) public function uasort($cmp_function)
{ {
throw BadMethodCallException::classIsImmutable(__CLASS__); throw BadMethodCallException::classIsImmutable(__CLASS__);
} }
/**
* Not supported.
*
* @see http://php.net/arrayiterator.uksort
* @throws BadMethodCallException
*/
public function uksort($cmp_function) public function uksort($cmp_function)
{ {
throw BadMethodCallException::classIsImmutable(__CLASS__); throw BadMethodCallException::classIsImmutable(__CLASS__);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment