Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.52 KB | None | 0 0
  1. Fatal error: Call to a member function setNom() on a non-object in /nfs/http6/vivafaune/www/src/VIVAFaune/AnnuaireBundle/DataFixtures/ORM/LoadAnnuareCategorieData.php on line 14
  2.  
  3.  
  4.  
  5. //LoadAnnuaireCategorieData
  6. <?php
  7.  
  8. namespace VIVAFaune\AnnuaireBundle\DataFixtures\ORM;
  9.  
  10. use Doctrine\Common\DataFixtures\FixtureInterface;
  11. use VIVAFaune\AnnuaireBundle\Entity\AnnuaireCategorie;
  12.  
  13.  
  14. class LoadAnnuaireCategorieData implements FixtureInterface
  15. {
  16.     public function load($manager)
  17.     {
  18.         $annuaireCategorie = new AnnuaireCategorie();
  19.         $AnnuaireCategorie->setNom(array(
  20.             'Eleveurs' => 'Eleveurs',
  21.             'Clubs' => 'Clubs',
  22.             'Magasins' => 'Magasins',
  23.             'Parcs et Zoos' => 'Parcs et Zoos',
  24.             'Vétérinaires' => 'Vétérinaires',
  25.         ));
  26.     }
  27. }
  28.  
  29.  
  30.  
  31.  
  32.  
  33. //Entity\AnnuaireCategorie
  34. <?php
  35.  
  36. namespace VIVAFaune\AnnuaireBundle\Entity;
  37.  
  38.  
  39. /**
  40.  * @orm:Entity
  41.  */
  42. class AnnuaireCategorie
  43. {
  44.     /**
  45.      * @orm:Id
  46.      * @orm:Column(type="integer")
  47.      * @orm:GeneratedValue(strategy="AUTO")
  48.      */
  49.      protected $id;
  50.      
  51.      /**
  52.       *  @orm:Column(type="string", length=128)
  53.       */
  54.      protected $nom;
  55.  
  56.     /**
  57.      * Get id
  58.      *
  59.      * @return integer $id
  60.      */
  61.     public function getId()
  62.     {
  63.         return $this->id;
  64.     }
  65.  
  66.     /**
  67.      * Set nom
  68.      *
  69.      * @param string $nom
  70.      */
  71.     public function setNom($nom)
  72.     {
  73.         $this->nom = $nom;
  74.     }
  75.  
  76.     /**
  77.      * Get nom
  78.      *
  79.      * @return string $nom
  80.      */
  81.     public function getNom()
  82.     {
  83.         return $this->nom;
  84.     }
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement