Switchboard
  • Namespace
  • Class
  • Tree

Namespaces

  • Fluxsauce
    • Switchboard

Classes

  • EnvDb
  • Environment
  • Persistent
  • Project
  • Provider
  • ProviderAcquia
  • ProviderPantheon
  • Site
  • Sqlite

Class Persistent

Generic class providing database persistence.

Direct known subclasses

Fluxsauce\Switchboard\EnvDb, Fluxsauce\Switchboard\Environment, Fluxsauce\Switchboard\Project, Fluxsauce\Switchboard\Site

Abstract
Namespace: Fluxsauce\Switchboard
Package: Fluxsauce\Switchboard
Located at library/fluxsauce/switchboard/src/Persistent.php

Methods summary

public
# __construct( integer $external_id = NULL, string $name = NULL )

Constructor.

Constructor.

Parameters

$external_id
integer
$external_id Optional external identifier.
$name
string
$name Optional name.

Throws

Exception
public mixed
# __get( string $name )

Magic __get.

Magic __get.

Parameters

$name
string
$name Name of the property to get.

Returns

mixed
Value of set property.

Throws

Exception
public
# __set( string $name, mixed $value )

Magic __set.

Magic __set.

Parameters

$name
string
$name Name of the property to set.
$value
mixed
$value Value of said property.

Throws

Exception
public string
# getTableName( )

Get the SQLite3 table name of an extending class.

Get the SQLite3 table name of an extending class.

Returns

string
Name of the table, which is the plural of the class name.
public
# create( )

Create a persistent record.

Create a persistent record.

public
# read( )

Read an environment.

Read an environment.

public
# update( mixed $update = array() )

Update a record.

Update a record.

public
# destroy( )

Delete a record.

Delete a record.

public array
# toArray( )

Dump to an array.

Dump to an array.

Returns

array
Property names and values.
public
# render( )

Render to standard output.

Render to standard output.

public
# renderDrushTable( )

Render as a Drush table.

Render as a Drush table.

public
# renderJson( )

Render as a JSON array.

Render as a JSON array.

Magic methods summary

Properties summary

protected integer $id
#

The Primary Key of the record.

The Primary Key of the record.

protected string $name
#

The machine name of the record.

The machine name of the record.

protected integer $updated
#

The UNIX timestamp of when the record was last updated.

The UNIX timestamp of when the record was last updated.

protected string $externalKeyName
#

Metadata for ORM defining database structure.

Metadata for ORM defining database structure.

Switchboard API documentation generated by ApiGen 2.8.0