public function make( $type )
    {
        $type = __NAMESPACE__ . "\\" . $type;
        if (class_exists( $type )) {
            /**
             * @var \Lti\Seo\Generators\Thing $object
             */
            $object = new $type( $this->helper );
            $result = $object->format();
            if (is_array( $result ) && ! empty( $result )) {
                return json_encode( array_merge( array( '@context' => 'http://schema.org' ), $result ) );
            }
        }

        return null;
    }
public function make( $type )
    {
        $type = __NAMESPACE__ . "\\" . $type;
        if (class_exists( $type )) {
            /**
             * @var \Lti\Seo\Generators\Thing $object
             */
            $object = new $type( $this->helper );
            $result = $object->format();
            if (is_array( $result ) && ! empty( $result )) {
                return json_encode( array_merge( array( '@context' => 'http://schema.org' ), $result ) );
            }
        }

        return null;
    }
public function make ( $ type ) { $ type = __NAMESPACE__ . "\\" . $ type ; if ( class_exists ( $ type ) ) { /**
             * @var \Lti\Seo\Generators\Thing $object
             */ $ object = new $ type ( $ this -> helper ) ; $ result = $ object -> format ( ) ; if ( is_array ( $ result ) && ! empty ( $ result ) ) { return json_encode ( array_merge ( array ( '@context' => 'http://schema.org' ) , $ result ) ) ; } } return null ; }
Our schema.org object factory

Makes a new object provided it can find the class

@param string $type The type of object to create

@return null|string json encoded json-ld string, ready for output
Our schema . org object factory