public function fetchCapture($captureId)
    {
        if ($this->offsetExists('captures')) {
            foreach ($this['captures'] as $capture) {
                if ($capture->getId() !== $captureId) {
                    continue;
                }

                return $capture->fetch();
            }
        }

        $capture = new Capture($this->connector, $this->getLocation(), $captureId);
        $capture->fetch();

        $this['captures'][] = $capture;

        return $capture;
    }
public function fetchCapture($captureId)
    {
        if ($this->offsetExists('captures')) {
            foreach ($this['captures'] as $capture) {
                if ($capture->getId() !== $captureId) {
                    continue;
                }

                return $capture->fetch();
            }
        }

        $capture = new Capture($this->connector, $this->getLocation(), $captureId);
        $capture->fetch();

        $this['captures'][] = $capture;

        return $capture;
    }
public function fetchCapture ( $ captureId ) { if ( $ this -> offsetExists ( 'captures' ) ) { foreach ( $ this [ 'captures' ] as $ capture ) { if ( $ capture -> getId ( ) !== $ captureId ) { continue ; } return $ capture -> fetch ( ) ; } } $ capture = new Capture ( $ this -> connector , $ this -> getLocation ( ) , $ captureId ) ; $ capture -> fetch ( ) ; $ this [ 'captures' ] [ ] = $ capture ; return $ capture ; }
Fetches the specified capture.

@param string $captureId Capture ID

@see Capture::fetch() For more information on how to fetch a capture

@throws ConnectorException        When the API replies with an error response
@throws RequestException          When an error is encountered
@throws \RuntimeException         On an unexpected API response
@throws \RuntimeException         If the response content type is not JSON
@throws \InvalidArgumentException If the JSON cannot be parsed
@throws \LogicException           When Guzzle cannot populate the response

@return Capture
Fetches the specified capture .