예제 #1
0
 /**
  * Initialize the property with its definition and values
  *
  * @param PropertyDefinitionInterface $propertyDefinition
  * @param mixed[] $values
  */
 public function __construct(PropertyDefinitionInterface $propertyDefinition, array $values)
 {
     $this->propertyDefinition = $propertyDefinition;
     $this->setId($propertyDefinition->getId());
     $this->setDisplayName($propertyDefinition->getDisplayName());
     $this->setLocalName($propertyDefinition->getLocalName());
     $this->setQueryName($propertyDefinition->getQueryName());
     $this->setValues($values);
 }
예제 #2
0
 /**
  * Sets the designated parameter to the query name of the given property.
  *
  * @param integer $parameterIndex the parameter index (one-based)
  * @param PropertyDefinitionInterface $propertyDefinition
  * @throws CmisInvalidArgumentException If property has no query name
  */
 public function setProperty($parameterIndex, PropertyDefinitionInterface $propertyDefinition)
 {
     $queryName = $propertyDefinition->getQueryName();
     if (empty($queryName)) {
         throw new CmisInvalidArgumentException('Property has no query name!');
     }
     $this->setParameter($parameterIndex, $this->escape($queryName));
 }