datatable.directory codebase
				https://datatable.directory/
			
			
		
			Você não pode selecionar mais de 25 tópicos
			Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
		
		
		
		
		
			
		
			
				
					
					
						
							29 linhas
						
					
					
						
							504 B
						
					
					
				
			
		
		
	
	
							29 linhas
						
					
					
						
							504 B
						
					
					
				| <?php
 | |
| 
 | |
| namespace MightyPork\Utils;
 | |
| 
 | |
| use MightyPork\Exceptions\NotExistException;
 | |
| use Illuminate\Support\Collection;
 | |
| 
 | |
| /**
 | |
|  * Improved collection with object access to fields
 | |
|  */
 | |
| class ObjCollection extends Collection
 | |
| {
 | |
| 	public function __get($name)
 | |
| 	{
 | |
| 		if (isset($this[$name])) return $this[$name];
 | |
| 
 | |
| 		throw new NotExistException("No '$name' in collection.");
 | |
| 	}
 | |
| 
 | |
| 	public function __isset($name)
 | |
| 	{
 | |
| 		return isset($this[$name]);
 | |
| 	}
 | |
| 
 | |
| 	public function __set($name, $value)
 | |
| 	{
 | |
| 		$this[$name] = $value;
 | |
| 	}
 | |
| }
 | |
| 
 |