Exemplo n.º 1
0
 /**
  * Short description of method singleton
  *
  * @access public
  * @author Cédric Alfonsi, <*****@*****.**>
  * @return core_kernel_versioning_FileProxy
  */
 public static function singleton()
 {
     $returnValue = null;
     if (is_null(self::$instance)) {
         self::$instance = new core_kernel_versioning_FileProxy();
     }
     $returnValue = self::$instance;
     return $returnValue;
 }
Exemplo n.º 2
0
 /**
  * Short description of method resolve
  *
  * @access public
  * @author Lionel Lecaque, <*****@*****.**>
  * @param  string version
  * @return boolean
  */
 public function resolve($version)
 {
     $returnValue = (bool) false;
     switch ($version) {
         case VERSIONING_FILE_VERSION_MINE:
         case VERSIONING_FILE_VERSION_THEIRS:
         case VERSIONING_FILE_VERSION_WORKING:
         case VERSIONING_FILE_VERSION_BASE:
             break;
         default:
             throw new common_Exception('Invalid Argument');
     }
     $returnValue = core_kernel_versioning_FileProxy::singleton()->resolve($this, $this->getAbsolutePath(), $version);
     return (bool) $returnValue;
 }