$v) { $this->{$k} = $v; } } else { $this->{'Name'} = ''; $this->{'Path'} = ''; } } public function Path() { if ( isset( $this->{'Path'} ) and ( $this->{'Path'} != '' ) ) { return $this->{'Path'}; } return $this->{'Name'}; } public function __call( $fn, array $args= NULL){ if(isset($this->{$fn})){ return $this->{$fn}; #array_unshift($args, $this); #call_user_func_array( $this->{$fn}, $args); } } public static function find_all() { $storage_areas = array(); $result = dbQuery( 'SELECT * FROM Storage ORDER BY Name'); $results = $result->fetchALL(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Storage' ); foreach ( $results as $row => $obj ) { $storage_areas[] = $obj; } return $storage_areas; } } ?>