forked from bcit-ci/ci3-cart-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9e9122
commit a347a4b
Showing
4 changed files
with
71 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.github export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Totoprayogo1916\CodeIgniter\Config; | ||
|
||
use CodeIgniter\Config\BaseConfig; | ||
|
||
class Cart extends BaseConfig | ||
{ | ||
/** | ||
* These are the regular expression rules that we use to validate the product ID and product name | ||
* alpha-numeric, dashes, underscores, or periods | ||
* | ||
* @var string | ||
*/ | ||
public $product_id_rules = '\.a-z0-9_-'; | ||
|
||
/** | ||
* These are the regular expression rules that we use to validate the product ID and product name | ||
* alpha-numeric, dashes, underscores, colons or periods | ||
* | ||
* @var string | ||
*/ | ||
public $product_name_rules = '\w \-\.\:'; | ||
|
||
/** | ||
* only allow safe product names | ||
* | ||
* @var bool | ||
*/ | ||
public $product_name_safe = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace Totoprayogo1916\CodeIgniter\Publishers; | ||
|
||
use CodeIgniter\Publisher\Publisher; | ||
|
||
class ConfigPublisher extends Publisher | ||
{ | ||
/** | ||
* Tell Publisher where to get the files. | ||
* Since we will use Composer to download | ||
* them we point to the "vendor" directory. | ||
* | ||
* @var string | ||
*/ | ||
protected $source = VENDORPATH . 'totoprayogo1916/codeigniter4-cart/src/Config/'; | ||
|
||
/** | ||
* Target to save | ||
* | ||
* @var string | ||
*/ | ||
protected $destination = APPPATH . 'Config'; | ||
|
||
/** | ||
* Use the "publish" method to indicate that this | ||
* class is ready to be discovered and automated. | ||
*/ | ||
public function publish(): bool | ||
{ | ||
return $this | ||
->addPath('Cart.php') | ||
->copy(); | ||
} | ||
} |