public function toArray() {

		$class = new \ReflectionClass($this);
		$props = $class -> getProperties();
		$data  = [];

		foreach($props as $prop) {

			if($class -> name === $prop -> class) {

				if(true === isset($this -> {$prop -> name})) {
					$data[$prop -> name] = $this -> {$prop -> name};
				}
			}
		}

		foreach($this -> columns as $column) {
			$data[key($column)] = $column[key($column)];
		}

		return $data;
	}
public function toArray() {

		$class = new \ReflectionClass($this);
		$props = $class -> getProperties();
		$data  = [];

		foreach($props as $prop) {

			if($class -> name === $prop -> class) {

				if(true === isset($this -> {$prop -> name})) {
					$data[$prop -> name] = $this -> {$prop -> name};
				}
			}
		}

		foreach($this -> columns as $column) {
			$data[key($column)] = $column[key($column)];
		}

		return $data;
	}
public function toArray ( ) { $ class = new \ ReflectionClass ( $ this ) ; $ props = $ class -> getProperties ( ) ; $ data = [ ] ; foreach ( $ props as $ prop ) { if ( $ class -> name === $ prop -> class ) { if ( true === isset ( $ this -> { $ prop -> name } ) ) { $ data [ $ prop -> name ] = $ this -> { $ prop -> name } ; } } } foreach ( $ this -> columns as $ column ) { $ data [ key ( $ column ) ] = $ column [ key ( $ column ) ] ; } return $ data ; }
Returns all variables to a single Array
@return array
Returns all variables to a single Array