blob: 95f923df31827169567f0cdc0285ce267bf39a80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<?php
/**
* TActiveRecord, TActiveRecordEventParameter, TActiveRecordInvalidFinderResult class file.
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @link http://www.pradosoft.com/
* @copyright Copyright © 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
* @package Prado\Data\ActiveRecord
*/
namespace Prado\Data\ActiveRecord;
/**
* TActiveRecordChangeEventParameter class
*
* TActiveRecordChangeEventParameter encapsulates the parameter data for
* ActiveRecord change commit events that are broadcasted. The following change events
* may be raise: {@link TActiveRecord::OnInsert}, {@link TActiveRecord::OnUpdate} and
* {@link TActiveRecord::OnDelete}. The {@link setIsValid IsValid} parameter can
* be set to false to prevent the requested change event to be performed.
*
* @author Wei Zhuo<weizhuo@gmail.com>
* @package Prado\Data\ActiveRecord
* @since 3.1.2
*/
class TActiveRecordChangeEventParameter extends TEventParameter
{
private $_isValid=true;
/**
* @return boolean whether the event should be performed.
*/
public function getIsValid()
{
return $this->_isValid;
}
/**
* @param boolean set to false to prevent the event.
*/
public function setIsValid($value)
{
$this->_isValid = TPropertyValue::ensureBoolean($value);
}
}
|