protected function roundRobinGet($field)
    {
        if (empty($this->$field) || !is_array($this->$field)) {
            return '';
        }
        $val = $this->$field;
        $idx = $field . 'Index';
        if (!isset($this->$idx) || $this->$idx >= count($val)) {
            $this->$idx = 0;
        }
        return $val[ $this->$idx++ ];
    }
protected function roundRobinGet($field)
    {
        if (empty($this->$field) || !is_array($this->$field)) {
            return '';
        }
        $val = $this->$field;
        $idx = $field . 'Index';
        if (!isset($this->$idx) || $this->$idx >= count($val)) {
            $this->$idx = 0;
        }
        return $val[ $this->$idx++ ];
    }
protected function roundRobinGet ( $ field ) { if ( empty ( $ this -> $ field ) || ! is_array ( $ this -> $ field ) ) { return '' ; } $ val = $ this -> $ field ; $ idx = $ field . 'Index' ; if ( ! isset ( $ this -> $ idx ) || $ this -> $ idx >= count ( $ val ) ) { $ this -> $ idx = 0 ; } return $ val [ $ this -> $ idx ++ ] ; }
Given an array property, returns the next element
from it and increments an index field
@param string $field
@return string
Given an array property returns the next element from it and increments an index field