lib/Site.php
public static function getPosts($query = false)
    {
        $namespace = $namespace = static::getSiteNamespace().'\\Models\\';

        return array_map(function ($post) use ($namespace) {
            $className = $namespace.$post->post_type;

            if (class_exists($className)) {
                return new $className($post);
            }

            return $post;
        }, Timber::get_posts($query));
    }
public static function getPosts($query = false)
    {
        $namespace = $namespace = static::getSiteNamespace().'\\Models\\';

        return array_map(function ($post) use ($namespace) {
            $className = $namespace.$post->post_type;

            if (class_exists($className)) {
                return new $className($post);
            }

            return $post;
        }, Timber::get_posts($query));
    }
Wraps Timber::get_posts($query) and intitialzes the each post as the correct
CustomPostType class.
@param mixed $query
@return array