Created
May 21, 2012 12:20
-
-
Save martisj/2762085 to your computer and use it in GitHub Desktop.
doctrine object retrieval
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$post = new models\Post; | |
$user = get_user($uid); | |
$post->setUser($user); | |
$embedly_post = $this->embedly_post($user_post); | |
$post->setContent($embedly_post); | |
$post->setCategory($type); | |
$post->setCampus_id($cid); | |
$post->setDate_order(date_create(now_mysql())); | |
$post->setDate_created(date_create(now_mysql())); | |
var_doctrine($post); | |
$this->em->persist($post); | |
$this->em->flush(); | |
$data['post'] = $post; | |
echo $this->load->view('feed/post', $data, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment