Skip to content

Commit

Permalink
Better namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Nov 16, 2023
1 parent 2a8606f commit 9076ba0
Show file tree
Hide file tree
Showing 41 changed files with 68 additions and 71 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ to the require-dev section of your `composer.json` file.
### View

```php
$form
use Yii2\Extensions\Filepond\FilePond;

echo $form
->field($formModel, 'image_file')
->widget(
FilePond::class,
Expand All @@ -76,6 +78,8 @@ $form
### Controller or Model

```php
use Yii2\Extensions\Filepond\FileProcessing;

$imageFile = FileProcessing::saveWithReturningFile(
$categoryForm->image_file,
Yii::getAlias('@uploads'),
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "yii2-extensions/filepond",
"type": "yii2-extension",
"description": "FilePond widget for PHP.",
"type": "library",
"description": "FilePond Widget for Yii Framework.",
"keywords": [
"yii2",
"filepond",
Expand Down Expand Up @@ -37,12 +37,12 @@
},
"autoload": {
"psr-4": {
"Yii\\FilePond\\": "src"
"Yii2\\Extensions\\FilePond\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Yii\\FilePond\\Tests\\": "tests"
"Yii2\\Extensions\\FilePond\\Tests\\": "tests"
}
},
"extra": {
Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Cdn/FilePondEncodePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Cdn;
namespace Yii2\Extensions\FilePond\Asset\Cdn;

use yii\web\AssetBundle;

Expand Down
4 changes: 2 additions & 2 deletions src/Asset/Cdn/FilePondImageCropPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Cdn;
namespace Yii2\Extensions\FilePond\Asset\Cdn;

use Yii\FilePond\Asset\FilePondAsset;
use Yii2\Extensions\FilePond\Asset\FilePondAsset;
use yii\web\AssetBundle;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Cdn/FilePondImageExifOrientationPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Cdn;
namespace Yii2\Extensions\FilePond\Asset\Cdn;

use yii\web\AssetBundle;

Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Cdn/FilePondImagePreviewPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Cdn;
namespace Yii2\Extensions\FilePond\Asset\Cdn;

use yii\web\AssetBundle;

Expand Down
4 changes: 2 additions & 2 deletions src/Asset/Cdn/FilePondImageTransformPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Cdn;
namespace Yii2\Extensions\FilePond\Asset\Cdn;

use Yii\FilePond\Asset\FilePondAsset;
use Yii2\Extensions\FilePond\Asset\FilePondAsset;
use yii\web\AssetBundle;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Asset/Cdn/FilePondPdfPreviewPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Cdn;
namespace Yii2\Extensions\FilePond\Asset\Cdn;

use Yii\FilePond\Asset\FilePondAsset;
use Yii2\Extensions\FilePond\Asset\FilePondAsset;
use yii\web\AssetBundle;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Asset/Cdn/FilePondRenamePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Cdn;
namespace Yii2\Extensions\FilePond\Asset\Cdn;

use Yii\FilePond\Asset\FilePondAsset;
use Yii2\Extensions\FilePond\Asset\FilePondAsset;
use yii\web\AssetBundle;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Cdn/FilePondValidateSizePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Cdn;
namespace Yii2\Extensions\FilePond\Asset\Cdn;

use yii\web\AssetBundle;

Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Cdn/FilePondValidateTypePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Cdn;
namespace Yii2\Extensions\FilePond\Asset\Cdn;

use yii\web\AssetBundle;

Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Dev/FilePondEncodePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Dev;
namespace Yii2\Extensions\FilePond\Asset\Dev;

use yii\web\AssetBundle;

Expand Down
4 changes: 2 additions & 2 deletions src/Asset/Dev/FilePondImageCropPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Dev;
namespace Yii2\Extensions\FilePond\Asset\Dev;

use Yii\FilePond\Asset\FilePondAsset;
use Yii2\Extensions\FilePond\Asset\FilePondAsset;
use yii\web\AssetBundle;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Dev/FilePondImageExifOrientationPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Dev;
namespace Yii2\Extensions\FilePond\Asset\Dev;

use yii\web\AssetBundle;

Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Dev/FilePondImagePreviewPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Dev;
namespace Yii2\Extensions\FilePond\Asset\Dev;

use yii\web\AssetBundle;

Expand Down
4 changes: 2 additions & 2 deletions src/Asset/Dev/FilePondImageTransformPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Dev;
namespace Yii2\Extensions\FilePond\Asset\Dev;

use Yii\FilePond\Asset\FilePondAsset;
use Yii2\Extensions\FilePond\Asset\FilePondAsset;
use yii\web\AssetBundle;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Asset/Dev/FilePondPdfPreviewPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Dev;
namespace Yii2\Extensions\FilePond\Asset\Dev;

use Yii\FilePond\Asset\FilePondAsset;
use Yii2\Extensions\FilePond\Asset\FilePondAsset;
use yii\web\AssetBundle;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Asset/Dev/FilePondRenamePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Dev;
namespace Yii2\Extensions\FilePond\Asset\Dev;

use Yii\FilePond\Asset\FilePondAsset;
use Yii2\Extensions\FilePond\Asset\FilePondAsset;
use yii\web\AssetBundle;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Dev/FilePondValidateSizePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Dev;
namespace Yii2\Extensions\FilePond\Asset\Dev;

use yii\web\AssetBundle;

Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Dev/FilePondValidateTypePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Dev;
namespace Yii2\Extensions\FilePond\Asset\Dev;

use yii\web\AssetBundle;

Expand Down
2 changes: 1 addition & 1 deletion src/Asset/FilePondAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset;
namespace Yii2\Extensions\FilePond\Asset;

use yii\web\AssetBundle;

Expand Down
2 changes: 1 addition & 1 deletion src/Asset/FilePondCdnAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset;
namespace Yii2\Extensions\FilePond\Asset;

use yii\web\AssetBundle;

Expand Down
2 changes: 1 addition & 1 deletion src/Asset/FilePondProdAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset;
namespace Yii2\Extensions\FilePond\Asset;

use yii\web\AssetBundle;

Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Prod/FilePondEncodePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Prod;
namespace Yii2\Extensions\FilePond\Asset\Prod;

use yii\web\AssetBundle;

Expand Down
4 changes: 2 additions & 2 deletions src/Asset/Prod/FilePondImageCropPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Prod;
namespace Yii2\Extensions\FilePond\Asset\Prod;

use Yii\FilePond\Asset\FilePondAsset;
use Yii2\Extensions\FilePond\Asset\FilePondAsset;
use yii\web\AssetBundle;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Prod/FilePondImageExifOrientationPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Prod;
namespace Yii2\Extensions\FilePond\Asset\Prod;

use yii\web\AssetBundle;

Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Prod/FilePondImagePreviewPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Prod;
namespace Yii2\Extensions\FilePond\Asset\Prod;

use yii\web\AssetBundle;

Expand Down
4 changes: 2 additions & 2 deletions src/Asset/Prod/FilePondImageTransformPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Prod;
namespace Yii2\Extensions\FilePond\Asset\Prod;

use Yii\FilePond\Asset\FilePondAsset;
use Yii2\Extensions\FilePond\Asset\FilePondAsset;
use yii\web\AssetBundle;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Asset/Prod/FilePondPdfPreviewPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Prod;
namespace Yii2\Extensions\FilePond\Asset\Prod;

use Yii\FilePond\Asset\FilePondProdAsset;
use Yii2\Extensions\FilePond\Asset\FilePondProdAsset;
use yii\web\AssetBundle;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Asset/Prod/FilePondRenamePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Prod;
namespace Yii2\Extensions\FilePond\Asset\Prod;

use Yii\FilePond\Asset\FilePondProdAsset;
use Yii2\Extensions\FilePond\Asset\FilePondProdAsset;
use yii\web\AssetBundle;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Prod/FilePondValidateSizePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Prod;
namespace Yii2\Extensions\FilePond\Asset\Prod;

use yii\web\AssetBundle;

Expand Down
2 changes: 1 addition & 1 deletion src/Asset/Prod/FilePondValidateTypePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond\Asset\Prod;
namespace Yii2\Extensions\FilePond\Asset\Prod;

use yii\web\AssetBundle;

Expand Down
2 changes: 1 addition & 1 deletion src/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond;
namespace Yii2\Extensions\FilePond;

use PHPForge\Html\Attribute;
use PHPForge\Html\Helper\Utils;
Expand Down
8 changes: 4 additions & 4 deletions src/FilePond.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

declare(strict_types=1);

namespace Yii\FilePond;
namespace Yii2\Extensions\FilePond;

use JsonException;
use PHPForge\Html\Helper\CssClass;
use PHPForge\Html\Helper\Utils;
use RuntimeException;
use Yii2\Extensions\FilePond\Asset\FilePondAsset;
use Yii2\Extensions\FilePond\Asset\FilePondCdnAsset;
use Yii2\Extensions\FilePond\Asset\FilePondProdAsset;
use Yii;
use Yii\FilePond\Asset\FilePondAsset;
use Yii\FilePond\Asset\FilePondCdnAsset;
use Yii\FilePond\Asset\FilePondProdAsset;
use yii\widgets\InputWidget;

final class FilePond extends InputWidget
Expand Down
2 changes: 1 addition & 1 deletion src/FileProcessing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yii\FilePond;
namespace Yii2\Extensions\FilePond;

use function base64_decode;
use function fclose;
Expand Down
Loading

0 comments on commit 9076ba0

Please sign in to comment.