plainview / sdk
Plainview SDK
20240902
2024-09-02 17:26 UTC
Requires
- php: >=5.4.0
- dev-master
- 20240902
- 20240511
- 20240213
- 20231210
- 20231202
- 20230918
- 20230913
- 20230906
- 20230809
- 20230503
- 20230420
- 20230419
- 20230321
- 20230303
- 20230225
- 20230205
- 20230104
- 20221214
- 20220821
- 20220811
- 20220717
- 20220619
- 20220125
- 20220122
- 20211109
- 20211017
- 20210906
- 20210810
- 20210701
- 20210615
- 20210216
- 20210205
- 20210122
- 20210120
- 20210119
- 20210110.02
- 20210110
- 20210105
- 20210104
- 20200617
- 20200608
- 20200402
- 20200223
- 20190812
- 20190716
- 20190607
- 20190411
- 20190404
- 20190331
- 20190322
- 20190314
- 20190222
- 20190119
- 20190117
- 20181115
- 20181114
- 20181107
- 20180708
- 20180611
- 20180504
- 20180425
- 20180413
- 20180411
This package is auto-updated.
Last update: 2024-10-02 17:42:15 UTC
README
A toolkit of commonly used classes and functions, including Wordpress and Drupal SDKs.
The SDK contains:
- Base set of useful functions
- Drupal SDK - currently only a Drupalized db_aware_object class
- Form2 manipulation class for HTML5
- Pagination class
- Table manipulation class
- Wordpress SDK - fully fledged SDK
- XHTML element class
- Unit tests
Base
- base.php is a base class of [mostly] static functions
- traits\db_aware_object is a trait that your objects can use to update themselves in the database
- form.php is an obsolete form handling class. Use form2 instead.
- mail\mail.php is a wrapper for PHPMailer
Requirements
- PHP v5.4 for traits support.
Standalone usage
Copy the files into a directory called plainview.
Require the autoloader. Assuming you have the SDK in a subdirectory called "plainview" (it must be called plainview but can be placed anywhere):
require_once( 'plainview/autoload.php' );
After that the classes are loaded automatically. The SDK's function can now be accessed statically:
if ( \plainview\sdk\base::is_email( 'test@test.com' ) )
echo 'Valid e-mail address!';
Or by dynamically instantiating the base:
class sdk_test extends \plainview\sdk\base
{
}
$test = new sdk_test();
if ( $test->is_email( 'test@test.com' ) )
echo 'Valid e-mail address!';
$instance = sdk_test::instance();
License
GPL v3
Contact
The author can be contacted at: edward@plainview.se