public function getTokens($refresh = false)
    {
        if (! $this->_tokens || $refresh) {
            if ($refresh) {
                $this->_firstToken = null;
            }
            $this->_tokens       = array();
            $this->_activeTokens = array();
            $tokenSelect = $this->tracker->getTokenSelect();
            $tokenSelect->andReceptionCodes()
                ->forRespondentTrack($this->_respTrackId);

            $tokenRows = $tokenSelect->fetchAll();
            $prevToken = null;
            foreach ($tokenRows as $tokenData) {

                $token = $this->tracker->getToken($tokenData);

                $this->_tokens[$token->getTokenId()] = $token;

                // While we are busy, set this
                if ($token->hasSuccesCode()) {
                    $this->_activeTokens[$token->getRoundId()] = $token;
                }

                // Link the tokens
                if ($prevToken) {
                    $prevToken->setNextToken($token);
                }
                $prevToken = $token;
            }
        }

        return $this->_tokens;
    }
public function getTokens($refresh = false)
    {
        if (! $this->_tokens || $refresh) {
            if ($refresh) {
                $this->_firstToken = null;
            }
            $this->_tokens       = array();
            $this->_activeTokens = array();
            $tokenSelect = $this->tracker->getTokenSelect();
            $tokenSelect->andReceptionCodes()
                ->forRespondentTrack($this->_respTrackId);

            $tokenRows = $tokenSelect->fetchAll();
            $prevToken = null;
            foreach ($tokenRows as $tokenData) {

                $token = $this->tracker->getToken($tokenData);

                $this->_tokens[$token->getTokenId()] = $token;

                // While we are busy, set this
                if ($token->hasSuccesCode()) {
                    $this->_activeTokens[$token->getRoundId()] = $token;
                }

                // Link the tokens
                if ($prevToken) {
                    $prevToken->setNextToken($token);
                }
                $prevToken = $token;
            }
        }

        return $this->_tokens;
    }
public function getTokens ( $ refresh = false ) { if ( ! $ this -> _tokens || $ refresh ) { if ( $ refresh ) { $ this -> _firstToken = null ; } $ this -> _tokens = array ( ) ; $ this -> _activeTokens = array ( ) ; $ tokenSelect = $ this -> tracker -> getTokenSelect ( ) ; $ tokenSelect -> andReceptionCodes ( ) -> forRespondentTrack ( $ this -> _respTrackId ) ; $ tokenRows = $ tokenSelect -> fetchAll ( ) ; $ prevToken = null ; foreach ( $ tokenRows as $ tokenData ) { $ token = $ this -> tracker -> getToken ( $ tokenData ) ; $ this -> _tokens [ $ token -> getTokenId ( ) ] = $ token ; // While we are busy, set this if ( $ token -> hasSuccesCode ( ) ) { $ this -> _activeTokens [ $ token -> getRoundId ( ) ] = $ token ; } // Link the tokens if ( $ prevToken ) { $ prevToken -> setNextToken ( $ token ) ; } $ prevToken = $ token ; } } return $ this -> _tokens ; }
Returns all the tokens in this track

@param boolean $refresh When true, always reload
@return \Gems_Tracker_Token[]
Returns all the tokens in this track