/** * @return Mismatch\DB\Query */ private function query() { return Metadata::get($this->class)['query']; }
/** * @return Mismatch\Metadata */ public function foreignMeta() { return Metadata::get($this->each); }
/** * @return Mismatch\Metadata */ public static function metadata() { return Metadata::get(get_called_class()); }
/** * Proxy to the query builder, so that all of its methods are * exposed as static methods on the class. * * @param string $method * @param array $args * @return mixed */ public static function __callStatic($method, array $args) { $query = Metadata::get(get_called_class())['query']; return call_user_func_array([$query, $method], $args); }