Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Doctrine_Tools extends Controller {
- function create_tables() {
- echo 'Reminder: Make sure the tables do not exist already.<br />
- <form action="" method="POST">
- <input type="submit" name="action" value="Create Tables"><br /><br />';
- if ($this->input->post('action')) {
- Doctrine::createTablesFromModels();
- echo "Done!";
- }
- }
- function test() {
- $u = new User();
- $data = array(
- 'username' => 'testuser',
- 'firstName' => 'Test',
- 'lastName' => 'User',
- 'email' => 'test@test.com',
- 'password' => 'a327310'
- );
- $u->fromArray($data);
- $u->save();
- echo 'User Created';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement