Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A toolkit of commonly used classes and functions, including Wordpress and Drupal SDKs.
branch: master
Failed to load latest commit information.
breadcrumbs
collections Added collection->collection() method for recursive collections.
drupal Moved files to prepare for composer.json
form2
html Moved files to prepare for composer.json
mail Moved files to prepare for composer.json
pagination
scripts Added rename and fixed incorrect pwd.
table Table: Element attribute modifications return this.
tests
thirdparty Moved files to prepare for composer.json
traits Added collections\html class.
tree
vendor
wordpress
Doxyfile
README.md Moved files to prepare for composer.json
base.php
composer.json Autoload now uses psr-4.
form.php

README.md

Plainview SDK

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 instancing 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!';

Third party libraries used

License

GPL v3

Contact

The author can be contacted at: edward@plainview.se

Something went wrong with that request. Please try again.