PHP Trait TORM\Callbacks

Exibir arquivo Open project: taq/torm

Public Methods

Method Description
afterCreate ( mixed $func ) : null After create
afterDestroy ( mixed $func ) : null Before save callback
afterSave ( mixed $func ) : null Before save callback
afterUpdate ( mixed $func ) : null After update
beforeCreate ( mixed $func ) : null Before create
beforeDestroy ( mixed $func ) : null Before save callback
beforeSave ( mixed $func ) : null Before save callback
beforeUpdate ( mixed $func ) : null Before update

Private Methods

Method Description
_addCallback ( string $cls, mixed $callback, mixed $func ) : null Add callback
_checkCallback ( string $cls, string $callback, mixed $context ) : exist Check if a callback exists
_initiateCallbacks ( string $cls ) : null Initiate callbacks

Method Details

afterCreate() public static method

After create
public static afterCreate ( mixed $func ) : null
$func mixed callback
return null

afterDestroy() public static method

Before save callback
public static afterDestroy ( mixed $func ) : null
$func mixed callback
return null

afterSave() public static method

Before save callback
public static afterSave ( mixed $func ) : null
$func mixed callback
return null

afterUpdate() public static method

After update
public static afterUpdate ( mixed $func ) : null
$func mixed callback
return null

beforeCreate() public static method

Before create
public static beforeCreate ( mixed $func ) : null
$func mixed callback
return null

beforeDestroy() public static method

Before save callback
public static beforeDestroy ( mixed $func ) : null
$func mixed callback
return null

beforeSave() public static method

Before save callback
public static beforeSave ( mixed $func ) : null
$func mixed callback
return null

beforeUpdate() public static method

Before update
public static beforeUpdate ( mixed $func ) : null
$func mixed callback
return null