From ee3df783130441e0b00d91dbefa109fdefe9ee81 Mon Sep 17 00:00:00 2001 From: sikofitt Date: Thu, 2 Feb 2017 18:35:22 -0800 Subject: [PATCH] updated example --- README.md | 4 ++-- src/Sikofitt/Retrorsum/Finder.php | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b27ecb3..224a163 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,13 @@ define('BASE_DIR', dirname((string)$finder)); or ```php -define('BASE_DIR', dirname((string)(new Finder('composer.json')))); +define('BASE_DIR', dirname((string)(new Finder('autoload.php')))); ``` Although this could set BASE_DIR as an empty string if it found nothing. ```php -$finder = new Finder('composer.json'); +$finder = new Finder('autoload.php'); if(true === $finder->isFound()) { define('BASE_DIR', dirname($finder->getPath())); diff --git a/src/Sikofitt/Retrorsum/Finder.php b/src/Sikofitt/Retrorsum/Finder.php index 3dcfed3..31c10ed 100644 --- a/src/Sikofitt/Retrorsum/Finder.php +++ b/src/Sikofitt/Retrorsum/Finder.php @@ -22,6 +22,11 @@ namespace Sikofitt\Retrorsum; /** * Class Finder. + * @Todo - Handle symlinks + * @Todo - Add ability to continue after finding, like + * PHP 7.0's extra parameter in dirname. + * Example new Finder($file, 2) would return the second + * instance of $file. */ class Finder {