public function saveInstagram(InstagramEntity $ent, $blvdId) { $socMedEnt = new SocialMediaEntity(); $socMedEnt->setUsername($ent->getUsername())->setSocialId($ent->getId())->setBlvdId($blvdId)->setTitle('')->setHeaderText('')->setText($ent->getCaption())->setMediaUrl($ent->getImage())->setMediaHeight(150)->setMediaWidth(150)->setLink($ent->getLink())->setSource('instagram')->setDateCreated(date("Y-m-d H:i:s", $ent->getCreatedTime())); $this->insertSocialMedia($socMedEnt); return $socMedEnt; }
public function formatSocialMediaEnt(InstagramEntity $ent) { $socMedEnt = new SocialMediaEntity(); $socMedEnt->setUsername($ent->getUsername())->setDateCreated(date("Y-m-d H:i:s"))->setBlvdId($ent->getBlvdId())->setLink($ent->getLink())->setMediaHeight(150)->setMediaWidth(150)->setText($ent->getCaption())->setSource('instagram')->setSocialId($ent->getId())->setMediaUrl($ent->getImage()); return $socMedEnt; }