* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class InvalidServerSocketException extends FrameworkException {
+class InvalidServerSocketException extends AbstractSocketException {
/**
* A Constructor for this exception
*
- * @param $messageArray Error message array
- * @param $code Error code
+ * @param $messageArray Error message array
+ * @param $code Error code
* @return void
*/
public function __construct (array $messageData, $code) {
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class InvalidSocketException extends FrameworkException {
+class InvalidSocketException extends AbstractSocketException {
/**
* A Constructor for this exception
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class NoSocketRegisteredException extends FrameworkException {
+class NoSocketRegisteredException extends AbstractSocketException {
/**
* A Constructor for this exception
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class SocketConnectionException extends FrameworkException {
+class SocketConnectionException extends AbstractSocketException {
/**
* A Constructor for this exception
*
- * @param $messageArray Error message array
- * @param $code Error code
+ * @param $messageArray Error message array
+ * @param $code Error code
* @return void
*/
public function __construct (array $messageData, $code) {
// Construct the message
$message = sprintf("[%s:] Could not make a connection, type=%s, errno=%s, errstr=%s",
$messageData[0]->__toString(),
- $messageData[1],
+ gettype($messageData[1]),
$messageData[2],
$messageData[3]
);
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class SocketCreationException extends FrameworkException {
+class SocketCreationException extends AbstractSocketException {
/**
* A Constructor for this exception
*
- * @param $messageArray Error message array
- * @param $code Error code
+ * @param $messageArray Error message array
+ * @param $code Error code
* @return void
*/
public function __construct (array $messageData, $code) {
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class SocketOptionException extends FrameworkException {
+class SocketOptionException extends AbstractSocketException {
/**
* A Constructor for this exception
*
- * @param $messageArray Error message array
- * @param $code Error code
+ * @param $messageArray Error message array
+ * @param $code Error code
* @return void
*/
public function __construct (array $messageData, $code) {
// Construct the message
$message = sprintf("[%s:] Changing option on socket failed, type=%s, errno=%s, errstr=%s",
$messageData[0]->__toString(),
- $messageData[1],
+ gettype($messageData[1]),
$messageData[2],
$messageData[3]
);
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class SocketShutdownException extends FrameworkException {
+class SocketShutdownException extends AbstractSocketException {
/**
* A Constructor for this exception
*
// Check if there was an error else
if ($errorNo > 0) {
// Then throw again
- throw new InvalidSocketException(array($helperInstance, gettype($socketResource), $errorNo, $errorStr), BaseListener::EXCEPTION_INVALID_SOCKET);
+ throw new InvalidSocketException(array($helperInstance, $socketResource, $errorNo, $errorStr), BaseListener::EXCEPTION_INVALID_SOCKET);
} // END - if
// Prepare the GET request
/**
* Setter for default time zone (must be correct!)
*
- * @param $zone The time-zone string (e.g. Europe/Berlin)
+ * @param $zone The time-zone string (e.g. Europe/Berlin)
* @return void
*/
public final function setDefaultTimezone ($zone) {
/**
* Setter for runtime magic quotes
+ *
+ * @param $enableQuotes Whether enable magic runtime quotes (should be disabled for security reasons)
+ * @return void
*/
public final function setMagicQuotesRuntime ($enableQuotes) {
// Cast it to boolean
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* ----------------------------------
+ * 1.4
+ * - Some comments improved, other minor improvements
* 1.3
* - Constructor is now empty and factory method 'createClassLoader' is created
* - renamed loadClasses to scanClassPath
}
/**
- * Our renamed factory method
+ * Creates an instance of this class loader for given configuration instance
*
- * @param $configInstance Configuration class instance
+ * @param $configInstance Configuration class instance
* @return void
*/
public static final function createClassLoader (FrameworkConfiguration $configInstance) {
/**
* Singleton getter for an instance of this class
*
- * @return $selfInstance A singleton instance of this class
+ * @return $selfInstance A singleton instance of this class
*/
public static final function getSelfInstance () {
// Is the instance there?
return;
} // END - if
- // Directories which our class loader ignores by default while
- // deep-scanning the directory structure.
+ /*
+ * Directories which this class loader ignores by default while
+ * scanning the whole directory structure starting from given base
+ * path.
+ */
$ignoreList[] = '.';
$ignoreList[] = '..';
$ignoreList[] = '.htaccess';
// Keep it in class for later usage
$this->ignoreList = $ignoreList;
- // Set base directory which holds all our classes, we should use an
- // absolute path here so is_dir(), is_file() and so on will always
- // find the correct files and dirs.
+ /*
+ * Set base directory which holds all our classes, we should use an
+ * absolute path here so is_dir(), is_file() and so on will always
+ * find the correct files and dirs.
+ */
$basePath2 = realpath($basePath);
// If the basePath is false it is invalid
// Include these extra configs now
$this->includeExtraConfigs();
- // Set the prefix back
+ // Set back the old prefix
$this->prefix = $oldPrefix;
}