Пример #1
0
 /**
  * Create a LockTocken from a string
  *
  * @param   string str
  * @return  util.webdav.LockTocken
  * @throws  lang.FormatException in case the string is not a valid opaquelocktoken
  */
 public static function fromString($str)
 {
     list($prefix, $uuidstr) = explode(':', $str, 2);
     if (LOCKTOKEN_PREFIX !== $prefix || FALSE === ($uuid = UUID::fromString($uuidstr))) {
         throw new FormatException($str . ' is not a valid opaquelocktoken string');
     }
     return new OpaqueLockTocken($uuid);
 }