12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace Mapping\Fixture\Document;
- use Gedmo\Mapping\Mock\Extension\Encoder\Mapping as Ext;
- use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
- /**
- * @ODM\Document(collection="test_users")
- */
- class User
- {
- /**
- * @ODM\Id
- */
- private $id;
- /**
- * @Ext\Encode(type="sha1", secret="xxx")
- * @ODM\String
- */
- private $name;
- /**
- * @Ext\Encode(type="md5")
- * @ODM\String
- */
- private $password;
- public function setName($name)
- {
- $this->name = $name;
- }
- public function getName()
- {
- return $this->name;
- }
- public function setPassword($password)
- {
- $this->password = $password;
- }
- public function getPassword()
- {
- return $this->password;
- }
- }
|