Exemplo n.º 1
0
 /**
  * Return lock details
  * @param core_kernel_classes_Resource $resource
  * @throws common_exception_InconsistentData
  * @return tao_helpers_lock_LockData
  */
 public function getLockData(core_kernel_classes_Resource $resource)
 {
     $values = $resource->getPropertyValues($this->getLockProperty());
     if (is_array($values) && count($values) == 1) {
         return OntoLockData::getLockData(array_pop($values));
     } else {
         return null;
     }
 }
Exemplo n.º 2
0
 /**
  * @expectedException common_exception_InconsistentData
  * @author Lionel Lecaque, lionel@taotesting.com
  */
 public function testGetLockDataExeption()
 {
     OntoLockData::getLockData(json_encode(array()));
 }