ManagerInterface.php
2.2 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php 
namespace Phalcon\Mvc\Collection {
	/**
	 * Phalcon\Mvc\Collection\ManagerInterface initializer
	 */
	
	interface ManagerInterface {
		/**
		 * Sets a custom events manager for a specific model
		 *
		 * @param \Phalcon\Mvc\CollectionInterface $model
		 * @param \Phalcon\Events\ManagerInterface $eventsManager
		 */
		public function setCustomEventsManager($model, $eventsManager);
		/**
		 * Returns a custom events manager related to a model
		 *
		 * @param \Phalcon\Mvc\CollectionInterface $model
		 * @return \Phalcon\Events\ManagerInterface
		 */
		public function getCustomEventsManager($model);
		/**
		 * Initializes a model in the models manager
		 *
		 * @param \Phalcon\Mvc\CollectionInterface $model
		 */
		public function initialize($model);
		/**
		 * Check whether a model is already initialized
		 *
		 * @param string $modelName
		 * @return bool
		 */
		public function isInitialized($modelName);
		/**
		 * Get the latest initialized model
		 *
		 * @return \Phalcon\Mvc\CollectionInterface
		 */
		public function getLastInitialized();
		/**
		 * Sets a connection service for a specific model
		 *
		 * @param \Phalcon\Mvc\CollectionInterface $model
		 * @param string $connectionService
		 */
		public function setConnectionService($model, $connectionService);
		/**
		 * Sets if a model must use implicit objects ids
		 *
		 * @param \Phalcon\Mvc\CollectionInterface $model
		 * @param boolean $useImplicitObjectIds
		 */
		public function useImplicitObjectIds($model, $useImplicitObjectIds);
		/**
		 * Checks if a model is using implicit object ids
		 *
		 * @param \Phalcon\Mvc\CollectionInterface $model
		 * @return boolean
		 */
		public function isUsingImplicitObjectIds($model);
		/**
		 * Returns the connection related to a model
		 *
		 * @param \Phalcon\Mvc\CollectionInterface $model
		 * @return \Phalcon\Db\AdapterInterface
		 */
		public function getConnection($model);
		/**
		 * Receives events generated in the models and dispatches them to a events-manager if available
		 * Notify the behaviors that are listening in the model
		 *
		 * @param string $eventName
		 * @param \Phalcon\Mvc\CollectionInterface $model
		 */
		public function notifyEvent($eventName, $model);
	}
}