| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  | <?php | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * MetaPieChartInterface.php | 
					
						
							|  |  |  |  * Copyright (c) 2017 thegrumpydictator@gmail.com | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2017-10-21 08:40:00 +02:00
										 |  |  |  * This file is part of Firefly III. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Firefly III is free software: you can redistribute it and/or modify | 
					
						
							|  |  |  |  * it under the terms of the GNU General Public License as published by | 
					
						
							|  |  |  |  * the Free Software Foundation, either version 3 of the License, or | 
					
						
							|  |  |  |  * (at your option) any later version. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Firefly III is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  |  * GNU General Public License for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU General Public License | 
					
						
							| 
									
										
										
										
											2017-12-17 14:41:58 +01:00
										 |  |  |  * along with Firefly III. If not, see <http://www.gnu.org/licenses/>. | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2017-04-09 07:44:22 +02:00
										 |  |  | declare(strict_types=1); | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace FireflyIII\Helpers\Chart; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | use Carbon\Carbon; | 
					
						
							|  |  |  | use FireflyIII\User; | 
					
						
							|  |  |  | use Illuminate\Support\Collection; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |  * Interface MetaPieChartInterface. | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  |  */ | 
					
						
							|  |  |  | interface MetaPieChartInterface | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-07-07 23:14:16 +02:00
										 |  |  |      * Generate a chart. | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  |      * @param string $direction | 
					
						
							|  |  |  |      * @param string $group | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return array | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function generate(string $direction, string $group): array; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-07-07 23:14:16 +02:00
										 |  |  |      * Accounts setter. | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  |      * @param Collection $accounts | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return MetaPieChartInterface | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2017-11-15 15:30:15 +01:00
										 |  |  |     public function setAccounts(Collection $accounts): MetaPieChartInterface; | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-07-07 23:14:16 +02:00
										 |  |  |      * Budgets setter. | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  |      * @param Collection $budgets | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return MetaPieChartInterface | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2017-11-15 15:30:15 +01:00
										 |  |  |     public function setBudgets(Collection $budgets): MetaPieChartInterface; | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-07-07 23:14:16 +02:00
										 |  |  |      * Categories setter. | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  |      * @param Collection $categories | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return MetaPieChartInterface | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2017-11-15 15:30:15 +01:00
										 |  |  |     public function setCategories(Collection $categories): MetaPieChartInterface; | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-07-07 23:14:16 +02:00
										 |  |  |      * Set if other objects should be collected. | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  |      * @param bool $collectOtherObjects | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return MetaPieChartInterface | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2017-11-15 15:30:15 +01:00
										 |  |  |     public function setCollectOtherObjects(bool $collectOtherObjects): MetaPieChartInterface; | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-07-07 23:14:16 +02:00
										 |  |  |      * Set the end date. | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  |      * @param Carbon $end | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return MetaPieChartInterface | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2017-11-15 15:30:15 +01:00
										 |  |  |     public function setEnd(Carbon $end): MetaPieChartInterface; | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-07-07 23:14:16 +02:00
										 |  |  |      * Set the start date. | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  |      * @param Carbon $start | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return MetaPieChartInterface | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2017-11-15 15:30:15 +01:00
										 |  |  |     public function setStart(Carbon $start): MetaPieChartInterface; | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-24 20:27:26 +01:00
										 |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-07-07 23:14:16 +02:00
										 |  |  |      * Set the tags. | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-02-24 20:27:26 +01:00
										 |  |  |      * @param Collection $tags | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return MetaPieChartInterface | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2017-11-15 15:30:15 +01:00
										 |  |  |     public function setTags(Collection $tags): MetaPieChartInterface; | 
					
						
							| 
									
										
										
										
											2017-02-24 20:27:26 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-07-07 23:14:16 +02:00
										 |  |  |      * Set the user. | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-01-03 17:02:17 +01:00
										 |  |  |      * @param User $user | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return MetaPieChartInterface | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2017-11-15 15:30:15 +01:00
										 |  |  |     public function setUser(User $user): MetaPieChartInterface; | 
					
						
							| 
									
										
										
										
											2017-02-05 19:51:58 +01:00
										 |  |  | } |