Commit 44bb264d authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction bug concernant le mapping de Source : la classe d'entité ne peut...

Correction bug concernant le mapping de Source : la classe d'entité ne peut hériter de celle d'UnicaenImport
parent 06a46d44
Loading
Loading
Loading
Loading
Loading
+0 −1
Changes for module/Application/config/module.config.php: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ return array(
                'drivers' => [
                    'Application\Entity\Db' => 'orm_default_xml_driver',
                    'Application\Entity\Db\VSitu' => 'orm_default_xml_driver',
                    'UnicaenImport\Entity\Db' => 'orm_default_xml_driver',
                ],
            ],
            'orm_default_xml_driver' => [
+128 −1
Changes for module/Application/src/Application/Entity/Db/Source.php: 128 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -5,13 +5,115 @@ namespace Application\Entity\Db;
/**
 * Source
 */
class Source extends \UnicaenImport\Entity\Db\Source
class Source
{
    /**
     * @var string
     */
    protected $code;

    /**
     * @var boolean
     */
    protected $importable;

    /**
     * @var string
     */
    protected $libelle;

    /**
     * @var int
     */
    protected $id;

    /**
     * @var Etablissement
     */
    protected $etablissement;

    /**
     * Set code
     *
     * @param string $code
     *
     * @return Source
     */
    public function setCode($code)
    {
        $this->code = $code;

        return $this;
    }

    /**
     * Get code
     *
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * Set importable
     *
     * @param boolean $importable
     *
     * @return Source
     */
    public function setImportable($importable)
    {
        $this->importable = $importable;

        return $this;
    }

    /**
     * Get importable
     *
     * @return boolean
     */
    public function getImportable()
    {
        return $this->importable;
    }

    /**
     * Set libelle
     *
     * @param string $libelle
     *
     * @return Source
     */
    public function setLibelle($libelle)
    {
        $this->libelle = $libelle;

        return $this;
    }

    /**
     * Get libelle
     *
     * @return string
     */
    public function getLibelle()
    {
        return $this->libelle;
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @return Etablissement
     */
@@ -19,4 +121,29 @@ class Source extends \UnicaenImport\Entity\Db\Source
    {
        return $this->etablissement;
    }

    /**
     * Retourne la représentation littérale de cet objet.
     *
     * @return string
     */
    public function __toString()
    {
        return $this->getLibelle();
    }

    /**
     * @since PHP 5.6.0
     * This method is called by var_dump() when dumping an object to get the properties that should be shown.
     * If the method isn't defined on an object, then all public, protected and private properties will be shown.
     *
     * @return array
     * @link  http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.debuginfo
     */
    function __debugInfo()
    {
        return [
            'libelle' => $this->libelle,
        ];
    }
}
 No newline at end of file