public function findCertificate($name)
    {
        foreach ($this->accounttypes as $type) {
            foreach ($this->accounts[$type] as $account) {
                // Skip empty accounts with no visible certificates
                if (!isset($account['certificates'])) {
                   continue;
                }
                foreach ($account['certificates'] as $certificate) {
                    if ($certificate['name'] == $name) {
                        $certificate['accounttype'] = $type;
                        $certificate['pemurl'] = $this->baseurl.'/'.$type.'/accounts/'.$certificate['account_id'].'/certificates/'.$certificate['id'].'/pem';

                        return $certificate;
                    }
                }
            }
        }
    }
public function findCertificate($name)
    {
        foreach ($this->accounttypes as $type) {
            foreach ($this->accounts[$type] as $account) {
                // Skip empty accounts with no visible certificates
                if (!isset($account['certificates'])) {
                   continue;
                }
                foreach ($account['certificates'] as $certificate) {
                    if ($certificate['name'] == $name) {
                        $certificate['accounttype'] = $type;
                        $certificate['pemurl'] = $this->baseurl.'/'.$type.'/accounts/'.$certificate['account_id'].'/certificates/'.$certificate['id'].'/pem';

                        return $certificate;
                    }
                }
            }
        }
    }
public function findCertificate ( $ name ) { foreach ( $ this -> accounttypes as $ type ) { foreach ( $ this -> accounts [ $ type ] as $ account ) { // Skip empty accounts with no visible certificates if ( ! isset ( $ account [ 'certificates' ] ) ) { continue ; } foreach ( $ account [ 'certificates' ] as $ certificate ) { if ( $ certificate [ 'name' ] == $ name ) { $ certificate [ 'accounttype' ] = $ type ; $ certificate [ 'pemurl' ] = $ this -> baseurl . '/' . $ type . '/accounts/' . $ certificate [ 'account_id' ] . '/certificates/' . $ certificate [ 'id' ] . '/pem' ; return $ certificate ; } } } } }
Really only necessary until I implement a direct API route to search for certificates...
Really only necessary until I implement a direct API route to search for certificates ...