Last active
December 18, 2015 17:09
-
-
Save raulfraile/5816283 to your computer and use it in GitHub Desktop.
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
<?php | |
public function load(ObjectManager $manager) | |
{ | |
$jokes = array( | |
'There’s no place like 127.0.0.1', | |
'If at first you don’t succeed; call it version 1.0', | |
'You know it’s love when you memorize her IP number to skip DNS overhead', | |
'Beware of programmers that carry screwdrivers', | |
'What color do you want that database?' | |
); | |
foreach ($jokes as $item) { | |
$joke = new Joke(); | |
$joke->setContent($item); | |
$manager->persist($joke); | |
} | |
$manager->flush(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment