Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught Error: Call to undefined method JeroenDesloovere\VCard\VCard::addURL() #176

Open
inpresif opened this issue Jan 1, 2021 · 0 comments

Comments

@inpresif
Copy link

inpresif commented Jan 1, 2021

I've been trying to add a URL, both clean from the sample code as well as the social TYPE= versions, but I'm not getting it to work.

As the title suggests, this is the error:
Fatal error: Uncaught Error: Call to undefined method JeroenDesloovere\VCard\VCard::addURL()

Here's some code:

$vcard = new VCard();
$vcard->add(new Name($lastname, $firstname, $additional, $prefix, $suffix))
        ->add(new Nickname('BotNinja'))
        ->add(new Address(null, null, $streetAndNumber, $city, $state, $zipcode, $country, Type::work()))
        ->add(new Email($email, Type::work()))
        ->add(new Note($specialNote))
        ->add(new Telephone($phone))
        ->add(new Photo($photo))
        //->add(new addUrl($webUrl,"TYPE=WEBSITE"))
;

//$vcard->addURL('https://www.facebook.com/username','TYPE=Facebook');
$vcard->addURL('http://www.jeroendesloovere.be');

You can see what I commented out, also has been tried.

Am I missing something? Without the URL all works fine, using this setup (using all "use" paths now and will cleanup when done):

require_once __DIR__ . "/vendor/autoload.php";

/*
 * Use Classes
 */

use JeroenDesloovere\VCard\Exception\VCardException;
use JeroenDesloovere\VCard\Formatter\Formatter;
use JeroenDesloovere\VCard\Formatter\VcfFormatter;
use JeroenDesloovere\VCard\Property\Address;
use JeroenDesloovere\VCard\Property\Anniversary;
use JeroenDesloovere\VCard\Property\Birthdate;
use JeroenDesloovere\VCard\Property\Email;
use JeroenDesloovere\VCard\Property\FullName;
use JeroenDesloovere\VCard\Property\Gender;
use JeroenDesloovere\VCard\Property\Logo;
use JeroenDesloovere\VCard\Property\Name;
use JeroenDesloovere\VCard\Property\Nickname;
use JeroenDesloovere\VCard\Property\NodeInterface;
use JeroenDesloovere\VCard\Property\Note;
use JeroenDesloovere\VCard\Property\Parameter\Kind;
use JeroenDesloovere\VCard\Property\Parameter\PropertyParameterInterface;
use JeroenDesloovere\VCard\Property\Parameter\Revision;
use JeroenDesloovere\VCard\Property\Parameter\Type;
use JeroenDesloovere\VCard\Property\Parameter\Version;
use JeroenDesloovere\VCard\Property\Photo;
use JeroenDesloovere\VCard\Property\PropertyInterface;
use JeroenDesloovere\VCard\Property\Role;
use JeroenDesloovere\VCard\Property\Telephone;
use JeroenDesloovere\VCard\Property\Title;

use JeroenDesloovere\VCard\VCard;

EDIT:
I see in the readme doc for the latest version, which I installed with composer, there is an unchecked URL reference: in the Explanatory Properties. I assume this means that isn't ported to the latest version yet?

If so, I'll get an earlier version, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant