Skip to content

Commit

Permalink
Trim all the things
Browse files Browse the repository at this point in the history
  • Loading branch information
wbond committed Nov 21, 2012
1 parent e44904d commit 7f95a67
Show file tree
Hide file tree
Showing 67 changed files with 11,666 additions and 11,666 deletions.
1,288 changes: 644 additions & 644 deletions fActiveRecord.php

Large diffs are not rendered by default.

238 changes: 119 additions & 119 deletions fAuthorization.php

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions fAuthorizationException.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php
/**
* An exception caused by an authorization error
*
*
* @copyright Copyright (c) 2011 Will Bond
* @author Will Bond [wb] <will@flourishlib.com>
* @license http://flourishlib.com/license
*
*
* @package Flourish
* @link http://flourishlib.com/fConnectivityException
*
*
* @version 1.0.0b
* @changes 1.0.0b The initial implementation [wb, 2011-05-09]
*/
Expand All @@ -20,17 +20,17 @@ class fAuthorizationException extends fExpectedException

/**
* Copyright (c) 2011 Will Bond <will@flourishlib.com>
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down
96 changes: 48 additions & 48 deletions fBuffer.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php
/**
* Provides a single, simplified interface for [http://php.net/outcontrol output buffering] to prevent nested buffering issues and provide a more logical API
*
*
* @copyright Copyright (c) 2008-2010 Will Bond
* @author Will Bond [wb] <will@flourishlib.com>
* @license http://flourishlib.com/license
*
*
* @package Flourish
* @link http://flourishlib.com/fBuffer
*
*
* @version 1.0.0b3
* @changes 1.0.0b3 Added a check to ensure the zlib extension is installd when doing gzipped buffering [wb, 2010-05-20]
* @changes 1.0.0b2 Added the `$gzip` parameter to ::start() [wb, 2010-05-19]
Expand All @@ -26,26 +26,26 @@ class fBuffer
const startCapture = 'fBuffer::startCapture';
const stop = 'fBuffer::stop';
const stopCapture = 'fBuffer::stopCapture';


/**
* If output capturing is currently active
*
*
* @var boolean
*/
static private $capturing = FALSE;

/**
* If output buffering has been started
*
*
* @var integer
*/
static private $started = FALSE;


/**
* Erases the output buffer
*
*
* @return void
*/
static public function erase()
Expand All @@ -62,11 +62,11 @@ static public function erase()
}
ob_clean();
}


/**
* Returns the contents of output buffer
*
*
* @return string The contents of the output buffer
*/
static public function get()
Expand All @@ -83,22 +83,22 @@ static public function get()
}
return ob_get_contents();
}


/**
* Checks if buffering has been started
*
*
* @return boolean If buffering has been started
*/
static public function isStarted()
{
return self::$started;
}


/**
* Replaces a value in the output buffer
*
*
* @param string $find The string to find
* @param string $replace The string to replace
* @return void
Expand All @@ -115,37 +115,37 @@ static public function replace($find, $replace)
'Output capturing is currently active and it must be stopped before a replacement can be made'
);
}

// ob_get_clean() actually turns off output buffering, so we do it the long way
$contents = ob_get_contents();
ob_clean();

echo str_replace($find, $replace, $contents);
}


/**
* Resets the configuration and buffer of the class
*
*
* @internal
*
*
* @return void
*/
static public function reset()
{
if (self::$capturing) {
self::stopCapture();
self::stopCapture();
}
if (self::$started) {
self::erase();
self::stop();
self::stop();
}
}


/**
* Starts output buffering
*
*
* @param boolean $gzip If the buffered output should be gzipped using [http://php.net/ob_gzhandler `ob_gzhandler()`]
* @return void
*/
Expand All @@ -170,11 +170,11 @@ static public function start($gzip=FALSE)
ob_start($gzip ? 'ob_gzhandler' : NULL);
self::$started = TRUE;
}


/**
* Starts capturing output, should be used with ::stopCapture() to grab output from code that does not offer an option of returning a value instead of outputting it
*
*
* @return void
*/
static public function startCapture()
Expand All @@ -187,11 +187,11 @@ static public function startCapture()
ob_start();
self::$capturing = TRUE;
}


/**
* Stops output buffering, flushing everything to the browser
*
*
* @return void
*/
static public function stop()
Expand All @@ -206,22 +206,22 @@ static public function stop()
'Output capturing is currently active and it must be stopped before buffering can be stopped'
);
}

// Only flush if there is content to push out, otherwise
// we might prevent headers from being sent
if (ob_get_contents()) {
ob_end_flush();
} else {
ob_end_clean();
}

self::$started = FALSE;
}


/**
* Stops capturing output, returning what was captured
*
*
* @return string The captured output
*/
static public function stopCapture()
Expand All @@ -234,11 +234,11 @@ static public function stopCapture()
self::$capturing = FALSE;
return ob_get_clean();
}


/**
* Forces use as a static class
*
*
* @return fBuffer
*/
private function __construct() { }
Expand All @@ -248,17 +248,17 @@ private function __construct() { }

/**
* Copyright (c) 2008-2010 Will Bond <will@flourishlib.com>
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down
Loading

0 comments on commit 7f95a67

Please sign in to comment.