public function Master_Get_By_Name($masterName) {
        $ret = false;

        if (is_string($masterName) === true) {
            $pageSize = 50;
            $begin = 1;
            $end = $pageSize;
            $filter = 'active';
            $more = true;
            while($more) {
                $res = $this->_call_api('get', "{$this->_url}/masters", array('begin' => $begin, 'end' => $end,
                                                                              'filter' => $filter));
                foreach($res->masters as $result) {
                    if ($result->masterName === $masterName) {
                        $ret = $result;
                        break;

                    }
                }

                // NOTE: Do not change >= to === below. Yesmail API does not always return the correct number of records. 
                // Using >= makes us safe from their bad math. 
                $more = ($ret === false && count($res->masters) >= $pageSize ? true : false);
                $begin += $pageSize;
                $end += $pageSize;
            }
        }

        if ($ret !== false) {
            $ret = $this->Master_Get((int)$ret->masterId);
        }

        return $ret;
    }
public function Master_Get_By_Name($masterName) {
        $ret = false;

        if (is_string($masterName) === true) {
            $pageSize = 50;
            $begin = 1;
            $end = $pageSize;
            $filter = 'active';
            $more = true;
            while($more) {
                $res = $this->_call_api('get', "{$this->_url}/masters", array('begin' => $begin, 'end' => $end,
                                                                              'filter' => $filter));
                foreach($res->masters as $result) {
                    if ($result->masterName === $masterName) {
                        $ret = $result;
                        break;

                    }
                }

                // NOTE: Do not change >= to === below. Yesmail API does not always return the correct number of records. 
                // Using >= makes us safe from their bad math. 
                $more = ($ret === false && count($res->masters) >= $pageSize ? true : false);
                $begin += $pageSize;
                $end += $pageSize;
            }
        }

        if ($ret !== false) {
            $ret = $this->Master_Get((int)$ret->masterId);
        }

        return $ret;
    }
public function Master_Get_By_Name ( $ masterName ) { $ ret = false ; if ( is_string ( $ masterName ) === true ) { $ pageSize = 50 ; $ begin = 1 ; $ end = $ pageSize ; $ filter = 'active' ; $ more = true ; while ( $ more ) { $ res = $ this -> _call_api ( 'get' , "{$this->_url}/masters" , array ( 'begin' => $ begin , 'end' => $ end , 'filter' => $ filter ) ) ; foreach ( $ res -> masters as $ result ) { if ( $ result -> masterName === $ masterName ) { $ ret = $ result ; break ; } } // NOTE: Do not change >= to === below. Yesmail API does not always return the correct number of records.  // Using >= makes us safe from their bad math.  $ more = ( $ ret === false && count ( $ res -> masters ) >= $ pageSize ? true : false ) ; $ begin += $ pageSize ; $ end += $ pageSize ; } } if ( $ ret !== false ) { $ ret = $ this -> Master_Get ( ( int ) $ ret -> masterId ) ; } return $ ret ; }
Get an existing Master by name

@param int $masterName The name of the master to retrieve
@return mixed A JSON decoded PHP variable representing the HTTP response, or false if the master is not found
@access public
Get an existing Master by name