lib/Core.php
public function import( $info, $force = false ) {
		if ( is_object($info) ) {
			$info = get_object_vars($info);
		}
		if ( is_array($info) ) {
			foreach ( $info as $key => $value ) {
				if ( $key === '' || ord($key[0]) === 0 ) {
					continue;
				}
				if ( !empty($key) && $force ) {
					$this->$key = $value;
				} else if ( !empty($key) && !method_exists($this, $key) ) {
					$this->$key = $value;
				}
			}
		}
	}
public function import( $info, $force = false ) {
		if ( is_object($info) ) {
			$info = get_object_vars($info);
		}
		if ( is_array($info) ) {
			foreach ( $info as $key => $value ) {
				if ( $key === '' || ord($key[0]) === 0 ) {
					continue;
				}
				if ( !empty($key) && $force ) {
					$this->$key = $value;
				} else if ( !empty($key) && !method_exists($this, $key) ) {
					$this->$key = $value;
				}
			}
		}
	}
public function import ( $ info , $ force = false ) { if ( is_object ( $ info ) ) { $ info = get_object_vars ( $ info ) ; } if ( is_array ( $ info ) ) { foreach ( $ info as $ key => $ value ) { if ( $ key === '' || ord ( $ key [ 0 ] ) === 0 ) { continue ; } if ( ! empty ( $ key ) && $ force ) { $ this -> $ key = $ value ; } else if ( ! empty ( $ key ) && ! method_exists ( $ this , $ key ) ) { $ this -> $ key = $ value ; } } } }
Takes an array or object and adds the properties to the parent object
@example
```php
$data = array('airplane' => '757-200', 'flight' => '5316');
$post = new Timber\Post()
$post->import(data);
echo $post->airplane; //757-200
```
@param array|object $info an object or array you want to grab data from to attach to the Timber object
Takes an array or object and adds the properties to the parent object