Exemplo n.º 1
0
 public function testGetByRef()
 {
     $object = new \DateTime();
     $fieldKey =& Archive::getByRef($object, 'field1', array());
     $this->assertSame(array(), $fieldKey);
     $fieldKey['foo'] = 'bar';
     $this->assertSame($fieldKey, Archive::get($object, 'field1'));
 }
Exemplo n.º 2
0
 /**
  * Returns the discriminator map.
  *
  * @return array|Boolean The discriminator map.
  *
  * @api
  */
 public function getDiscriminatorMap()
 {
     return Archive::get($this, 'discriminatorMap');
 }
Exemplo n.º 3
0
 /**
  * Returns the reference field.
  *
  * @return string The reference field.
  *
  * @api
  */
 public function getField()
 {
     return Archive::get($this, 'field');
 }
Exemplo n.º 4
0
 /**
  * Returns the discriminator field.
  *
  * @return string The discriminator field.
  *
  * @api
  */
 public function getDiscriminatorField()
 {
     return Archive::get($this, 'discriminatorField');
 }
Exemplo n.º 5
0
 /**
  * Returns the original value of an embedded one.
  *
  * @param string $name The embedded one name.
  *
  * @return mixed The embedded one original value.
  *
  * @api
  */
 public function getOriginalEmbeddedOneValue($name)
 {
     if (Archive::has($this, 'embedded_one.' . $name)) {
         return Archive::get($this, 'embedded_one.' . $name);
     }
     if (isset($this->data['embeddedsOne'][$name])) {
         return $this->data['embeddedsOne'][$name];
     }
     return null;
 }
Exemplo n.º 6
0
Arquivo: Group.php Projeto: hybr/jpm
 /**
  * Returns the document class.
  *
  * @api
  */
 public function getDocumentClass()
 {
     return Archive::get($this, 'document_class');
 }