src/Maths/Algebra/Matrix.php
public function get($index)
    {
        try {
            if (is_string($index)) {
                if ($this->getWalkFlag() & self::WALK_X) {
                    $ret = $this->getX($index);
                } elseif ($this->getWalkFlag() & self::WALK_Y) {
                    $ret = $this->getY($index);
                } else {
                    $ret = $this->getXY($index);
                }
            } else {
                $ret = $this->getInt($index);
            }
        } catch (InvalidArgumentException $e) {
            throw $e;
        } catch (OutOfRangeException $e) {
            throw $e;
        }
        return $ret;
    }
public function get($index)
    {
        try {
            if (is_string($index)) {
                if ($this->getWalkFlag() & self::WALK_X) {
                    $ret = $this->getX($index);
                } elseif ($this->getWalkFlag() & self::WALK_Y) {
                    $ret = $this->getY($index);
                } else {
                    $ret = $this->getXY($index);
                }
            } else {
                $ret = $this->getInt($index);
            }
        } catch (InvalidArgumentException $e) {
            throw $e;
        } catch (OutOfRangeException $e) {
            throw $e;
        }
        return $ret;
    }
Get a cell value by index according to matrix's flags

@param   string|int     $index
@return  mixed|null
@throws  OutOfRangeException if the index is out of range
@throws  InvalidArgumentException if the argument is malformed
@see     self::getX()
@see     self::getY()
@see     self::getXY()
@see     self::getInt()