belgattitude / soluble-japha

PHP Java integration
https://belgattitude.github.io/soluble-japha/
MIT License
69 stars 15 forks source link

Removal of obsolete getIterator() methods in AbstractJava #32

Closed belgattitude closed 7 years ago

belgattitude commented 7 years ago

Remove a bunch of obsolete code in AbstractJava that where kept for compatibility with older release of PHP/JavaBridge.

See those methods in Soluble\Japha\Bridge\Driver\Pjb62\AbstractJava:

    /**
     * @return ObjectIterator
     */
    public function getIterator()
    {
        if (!isset($this->__delegate)) {
            $this->__createDelegate();
        }
        if (func_num_args() == 0) {
            return $this->__delegate->getIterator();
        }

        $args = func_get_args();

        return $this->__call('getIterator', $args);
    }

    /**
     * @param string|int $idx
     *
     * @return bool
     */
    public function offsetExists($idx)
    {
        if (!isset($this->__delegate)) {
            $this->__createDelegate();
        }
        if (func_num_args() == 1) {
            return $this->__delegate->offsetExists($idx);
        }
        $args = func_get_args();

        return $this->__call('offsetExists', $args);
    }

    /**
     * @param string|int $idx
     *
     * @return mixed
     */
    public function offsetGet($idx)
    {
        if (!isset($this->__delegate)) {
            $this->__createDelegate();
        }
        if (func_num_args() == 1) {
            return $this->__delegate->offsetGet($idx);
        }
        $args = func_get_args();

        return $this->__call('offsetGet', $args);
    }

    /**
     * @param string|int $idx
     * @param mixed      $val
     *
     * @return mixed
     */
    public function offsetSet($idx, $val)
    {
        if (!isset($this->__delegate)) {
            $this->__createDelegate();
        }
        if (func_num_args() == 2) {
            return $this->__delegate->offsetSet($idx, $val);
        }
        $args = func_get_args();

        return $this->__call('offsetSet', $args);
    }

    public function offsetUnset($idx)
    {
        if (!isset($this->__delegate)) {
            $this->__createDelegate();
        }
        if (func_num_args() == 1) {
            return $this->__delegate->offsetUnset($idx);
        }
        $args = func_get_args();

        return $this->__call('offsetUnset', $args);
    }
belgattitude commented 7 years ago

Not yet the time... Still used