-
Notifications
You must be signed in to change notification settings - Fork 192
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
allow extention of setProperty(), add socialmedia option #136
base: master
Are you sure you want to change the base?
Conversation
* @param string $addr The address of the social media platform. | ||
* @return $this | ||
*/ | ||
public function addSocial($type = '', $url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests for this function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my todo list.
@@ -245,6 +245,13 @@ protected function parse() | |||
$key = !empty($types) ? implode(';', $types) : 'default'; | |||
$cardData->url[$key][] = $value; | |||
break; | |||
case 'SOCIALMEDIA': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests for parsing this data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my todo list, do you have any examples?
The vCard standard says we need to use the URL for social media references.This will make it incompatible with the standard. |
update package
Hello, great job continuing to enhance the vCard repo allowing so much reach with a simple file.
After using a simple vCard script for 5 years it is time for an upgrade after reviewing additional properties and functions I found $this repo. Here are 2 suggestions:
Adding a Social Media option, this will allow twitter, flickr, linkedin, etc... to be listed in the vCard
Change the property type for setProperty from private to protected which would allow the ability to extend the class with custom functionality while maintaining the ability to use PHP Composer.
There are a few updates I'd list to submit if this request it approved. Several "type field" options which could be improved, more on this later. Thanks!
Here is a working example with modifications:
vCard for Jason Gegere