Rename interfaces
This commit is contained in:
		
					parent
					
						
							
								e7918c03f7
							
						
					
				
			
			
				commit
				
					
						78bb1bd86e
					
				
			
		
					 13 changed files with 162 additions and 67 deletions
				
			
		
							
								
								
									
										43
									
								
								src/FFMpeg/Format/Dimension.php
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								src/FFMpeg/Format/Dimension.php
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,43 @@ | |||
| <?php | ||||
| 
 | ||||
| /* | ||||
|  * This file is part of PHP-FFmpeg. | ||||
|  * | ||||
|  * (c) Alchemy <info@alchemy.fr> | ||||
|  * | ||||
|  * For the full copyright and license information, please view the LICENSE | ||||
|  * file that was distributed with this source code. | ||||
|  */ | ||||
| 
 | ||||
| namespace FFMpeg\Format; | ||||
| 
 | ||||
| use FFMpeg\Exception\InvalidArgumentException; | ||||
| 
 | ||||
| /** | ||||
|  * @author Romain Neutron imprec@gmail.com | ||||
|  */ | ||||
| class Dimension | ||||
| { | ||||
|     protected $width; | ||||
|     protected $height; | ||||
| 
 | ||||
|     public function __construct($width, $height) | ||||
|     { | ||||
|         if ($width <= 0 || $height <= 0) { | ||||
|             throw InvalidArgumentException('Width and height should be positive integer'); | ||||
|         } | ||||
| 
 | ||||
|         $this->width = (int) $width; | ||||
|         $this->height = (int) $height; | ||||
|     } | ||||
| 
 | ||||
|     public function getWidth() | ||||
|     { | ||||
|         return $this->width; | ||||
|     } | ||||
| 
 | ||||
|     public function getHeight() | ||||
|     { | ||||
|         return $this->height; | ||||
|     } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue