Behavior.php
1.07 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php 
namespace Phalcon\Mvc\Model {
	/**
	 * Phalcon\Mvc\Model\Behavior
	 *
	 * This is an optional base class for ORM behaviors
	 */
	
	abstract class Behavior {
		protected $_options;
		/**
		 * \Phalcon\Mvc\Model\Behavior
		 *
		 * @param array $options
		 */
		public function __construct($options=null){ }
		/**
		 * Checks whether the behavior must take action on certain event
		 *
		 * @param string $eventName
		 */
		protected function mustTakeAction(){ }
		/**
		 * Returns the behavior options related to an event
		 *
		 * @param string $eventName
		 * @return array
		 */
		protected function getOptions(){ }
		/**
		 * This method receives the notifications from the EventsManager
		 *
		 * @param string $type
		 * @param \Phalcon\Mvc\ModelInterface $model
		 */
		public function notify($type, $model){ }
		/**
		 * Acts as fallbacks when a missing method is called on the model
		 *
		 * @param \Phalcon\Mvc\ModelInterface $model
		 * @param string $method
		 * @param array $arguments
		 */
		public function missingMethod($model, $method, $arguments=null){ }
	}
}