------------------------------------------------------------
revno: 1184
committer: Roger Martin <[email protected]>
branch nick: aikiframework
timestamp: Wed 2012-04-25 22:17:03 +0200
message:
  literals with __() functions
modified:
  libs/File.php*


--
lp:aikiframework
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk

Your team Aiki Framework Developers is subscribed to branch lp:aikiframework.
To unsubscribe from this branch go to 
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk/+edit-subscription
=== modified file 'libs/File.php' (properties changed: +x to -x)
--- libs/File.php	2011-11-08 13:42:45 +0000
+++ libs/File.php	2012-04-25 20:17:03 +0000
@@ -51,7 +51,7 @@
 			if (!is_dir($this->_root . "/" . $dir)) {
 				$success = mkdir($dir, octdec($mode), true);
 				if ( false === $success ) {
-					throw new AikiException("Failed to make directory " . $dir);
+					throw new AikiException( __sprintf("Failed to make directory %s", $dir));
 				}
 			}
 		}
@@ -69,7 +69,7 @@
 		   $mode = substr(sprintf('%o', $mode), -4);
 		}
 		else {
-			throw new AikiException("Failed to get mode from " . $target);
+			throw new AikiException( __sprinf("Failed to get mode from %s", $target));
 		}
 		return $mode;
 	}
@@ -126,19 +126,19 @@
 						if (!copy($target . DIRECTORY_SEPARATOR .
 								$file, $destination .
 								DIRECTORY_SEPARATOR . $file)) {
-							throw new AikiException("Failed to copy " . $target);
+							throw new AikiException( __sprintf("Failed to copy %s", $target));
 						}
 					}
 				}
 			} else {
-				throw new AikiException("Failed to get files from " . $target);
+				throw new AikiException( __sprintf("Failed to get files from %s", $target));
 			}
 		} elseif (is_file($target)) {
 			if (!copy($target, $destination)) {
-				throw new AikiException("Failed to copy " . $target);
+				throw new AikiException( __sprintf("Failed to copy %s",$target));
 			}
 		} else {
-			throw new AikiException("Invalid target " . $target);
+			throw new AikiException( __sprintf("Invalid target %s", $target));
 		}
 	}
 	
@@ -168,7 +168,7 @@
 	public function __call($method, $arguments) {
 		$extender = $this->getExtender();
 		if (false === method_exists($extender, $method)) {
-			throw new AikiException("Failed to find method: $method");
+			throw new AikiException( __sprintf("Failed to find method: %s",$method));
 		}
 		$result = call_user_func_array(Array($extender, $method), $arguments);
 		return $result;
@@ -187,7 +187,7 @@
 		}
 		$this->_extender = new $extender($arguments);
 		if ( false === $this->_extender instanceof TransferInterface ) {
-			throw new AikiException("This $extender must implement TransferInterface");
+			throw new AikiException( __sprintf("This %s must implement TransferInterface",$extender));
 		}
 		return $this->_extender;
 	}
@@ -201,7 +201,7 @@
 			return $this;
 		}
 		if ( false === is_string($extender) ) {
-			throw new AikiException("Invalid type: $extender");
+			throw new AikiException( __sprintf("Invalid type: %s",$extender));
 		}
 		$this->_extender = $extender;
 		return $this;
@@ -220,5 +220,3 @@
 		$this->_extenderArguments = $arguments;
 	}
 }
-
-?>
\ No newline at end of file

_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help   : https://help.launchpad.net/ListHelp

Reply via email to