Permalink
Browse files

Use vendor/autoload.php for loading

Updated all the examples to use vendor/autoload.php instead of our
bootstrap file, which, coincidentally, no longer exists.
  • Loading branch information...
1 parent d90fe96 commit 32d6b337f87a060762d1cd1418d93051e54b15ef Jarrod Nettles committed Mar 10, 2013
View
@@ -1,7 +0,0 @@
-<h1>Calling PHPThumb As &lt;img src="&hellip;" /&gt;</h1>
-
-<p><strong>Original</strong></p>
-<p><img src="/src/examples/test.jpg" /></p>
-
-<p><strong>Modified</strong></p>
-<p><img src="/src/PHPThumb.php?src=/src/examples/test.jpg&w=200" /></p>
View
@@ -23,7 +23,7 @@
* @filesource
*/
-require_once '../tests/bootstrap.php';
+require_once '../vendor/autoload.php';
$thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg');
$thumb->crop(100, 100, 300, 200);
@@ -23,11 +23,10 @@
* @filesource
*/
-require_once '../ThumbLib.inc.php';
$fileData = file_get_contents('test.jpg');
-$thumb = PhpThumbFactory::create($fileData, array(), true);
+$thumb = new PHPThumb\GD($fileData);
$thumb->crop(100, 100, 300, 200);
// $imageAsString will contain the image data suitable for saving in a database.
@@ -23,7 +23,7 @@
* @filesource
*/
-require_once '../tests/bootstrap.php';
+require_once '../vendor/autoload.php';
$thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg');
$thumb->cropFromCenter(200, 100);
View
@@ -23,11 +23,11 @@
* @filesource
*/
-require_once '../tests/bootstrap.php';
+require_once '../vendor/autoload.php';
-$thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg', array(), new PHPThumb\PluginCollection(array(
+$thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg', array(), array(
new PHPThumb\Plugins\Reflection(40, 40, 80, true, '#a4a4a4')
-)));
+));
$thumb->adaptiveResize(250, 250);
$thumb->show();
@@ -23,7 +23,7 @@
* @filesource
*/
-require_once '../tests/bootstrap.php';
+require_once '../vendor/autoload.php';
$thumb = new PHPThumb\GD('http://phpthumb.gxdlabs.com/wp-content/themes/phpthumb/images/header_bg.png');
$thumb->resize(200, 200);
@@ -23,7 +23,7 @@
* @filesource
*/
-require_once '../tests/bootstrap.php';
+require_once '../vendor/autoload.php';
$thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg');
$thumb->adaptiveResize(175, 175);
@@ -23,7 +23,7 @@
* @filesource
*/
-require_once '../tests/bootstrap.php';
+require_once '../vendor/autoload.php';
$thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg');
$thumb->resize(100, 100);
@@ -23,7 +23,7 @@
* @filesource
*/
-require_once '../tests/bootstrap.php';
+require_once '../vendor/autoload.php';
$thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg');
$thumb->resizePercent(50);
@@ -23,7 +23,7 @@
* @filesource
*/
-require_once '../tests/bootstrap.php';
+require_once '../vendor/autoload.php';
$thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg');
$thumb->rotateImageNDegrees(180);
@@ -23,7 +23,7 @@
* @filesource
*/
-require_once '../tests/bootstrap.php';
+require_once '../vendor/autoload.php';
$thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg');
$thumb->rotateImage('CW');
@@ -23,7 +23,7 @@
* @filesource
*/
-require_once '../tests/bootstrap.php';
+require_once '../vendor/autoload.php';
$thumb = new PHPThumb\GD(__DIR__ .'/../tests/resources/test.jpg');
$thumb->adaptiveResize(300, 300);

0 comments on commit 32d6b33

Please sign in to comment.