PageRenderTime 44ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures/lib/model/doctrine/base/BaseArticle.class.php

https://bitbucket.org/ealexandru/jobeet
PHP | 117 lines | 73 code | 5 blank | 39 comment | 0 complexity | aedac42d41f37c480dcbad48d897f2d4 MD5 | raw file
Possible License(s): ISC, AGPL-3.0, LGPL-2.1, BSD-3-Clause, LGPL-3.0
  1. <?php
  2. /**
  3. * BaseArticle
  4. *
  5. * This class has been auto-generated by the Doctrine ORM Framework
  6. *
  7. * @property integer $author_id
  8. * @property boolean $is_on_homepage
  9. * @property string $title
  10. * @property string $body
  11. * @property string $test_column
  12. * @property integer $views
  13. * @property string $type
  14. * @property Author $Author
  15. * @property Doctrine_Collection $camelCase
  16. *
  17. * @method integer getAuthorId() Returns the current record's "author_id" value
  18. * @method boolean getIsOnHomepage() Returns the current record's "is_on_homepage" value
  19. * @method string getTitle() Returns the current record's "title" value
  20. * @method string getBody() Returns the current record's "body" value
  21. * @method string getTestColumn() Returns the current record's "test_column" value
  22. * @method integer getViews() Returns the current record's "views" value
  23. * @method string getType() Returns the current record's "type" value
  24. * @method Author getAuthor() Returns the current record's "Author" value
  25. * @method Doctrine_Collection getCamelCase() Returns the current record's "camelCase" collection
  26. * @method Article setAuthorId() Sets the current record's "author_id" value
  27. * @method Article setIsOnHomepage() Sets the current record's "is_on_homepage" value
  28. * @method Article setTitle() Sets the current record's "title" value
  29. * @method Article setBody() Sets the current record's "body" value
  30. * @method Article setTestColumn() Sets the current record's "test_column" value
  31. * @method Article setViews() Sets the current record's "views" value
  32. * @method Article setType() Sets the current record's "type" value
  33. * @method Article setAuthor() Sets the current record's "Author" value
  34. * @method Article setCamelCase() Sets the current record's "camelCase" collection
  35. *
  36. * @package symfony12
  37. * @subpackage model
  38. * @author Your name here
  39. * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
  40. */
  41. abstract class BaseArticle extends myDoctrineRecord
  42. {
  43. public function setTableDefinition()
  44. {
  45. $this->setTableName('article');
  46. $this->hasColumn('author_id', 'integer', null, array(
  47. 'type' => 'integer',
  48. ));
  49. $this->hasColumn('is_on_homepage', 'boolean', null, array(
  50. 'type' => 'boolean',
  51. ));
  52. $this->hasColumn('title', 'string', 255, array(
  53. 'type' => 'string',
  54. 'unique' => true,
  55. 'length' => 255,
  56. ));
  57. $this->hasColumn('body', 'string', 255, array(
  58. 'type' => 'string',
  59. 'length' => 255,
  60. ));
  61. $this->hasColumn('test_column', 'string', 255, array(
  62. 'type' => 'string',
  63. 'length' => 255,
  64. ));
  65. $this->hasColumn('views', 'integer', null, array(
  66. 'type' => 'integer',
  67. ));
  68. $this->hasColumn('type', 'string', 255, array(
  69. 'type' => 'string',
  70. 'length' => 255,
  71. ));
  72. $this->setSubClasses(array(
  73. 'BlogArticle' =>
  74. array(
  75. 'type' => 'BlogArticle',
  76. ),
  77. ));
  78. }
  79. public function setUp()
  80. {
  81. parent::setUp();
  82. $this->hasOne('Author', array(
  83. 'local' => 'author_id',
  84. 'foreign' => 'id'));
  85. $this->hasMany('CamelCase as camelCase', array(
  86. 'local' => 'id',
  87. 'foreign' => 'article_id'));
  88. $i18n0 = new Doctrine_Template_I18n(array(
  89. 'fields' =>
  90. array(
  91. 0 => 'title',
  92. 1 => 'body',
  93. 2 => 'test_column',
  94. ),
  95. ));
  96. $sluggable1 = new Doctrine_Template_Sluggable(array(
  97. 'fields' =>
  98. array(
  99. 0 => 'title',
  100. ),
  101. 'uniqueBy' =>
  102. array(
  103. 0 => 'lang',
  104. 1 => 'title',
  105. ),
  106. ));
  107. $i18n0->addChild($sluggable1);
  108. $timestampable0 = new Doctrine_Template_Timestampable();
  109. $this->actAs($i18n0);
  110. $this->actAs($timestampable0);
  111. }
  112. }