Forum


Replies: 8   Views: 4821
Namespace version throws error
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by Movian  · 10-06-2016 - 13:08

Hey,

 

trying to setup the namespace version of phpdocx 6.0 in laravel  and I am getting a warning about a depricated constructor in fpdi_pdf_parser.php
 

ErrorException in fpdi_pdf_parser.php line 22:
Methods with the same name as their class will not be constructors in a future version of PHP; fpdi_pdf_parser has a deprecated constructor


here is how I have setup the controler - am I doing something wrong? 

<?php
namespace App\Http\Controllers;

use Auth;
use Session;

use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Input;

class DocXController extends Controller {

    public function showMakeDoc()
    {
        require_once app_path().'\phpdocx\Classes\Phpdocx\Create\CreateDocx.inc';
        $docx = new CreateDocx();
        $docx->addText('This is a test');
        $docx->createDocx('../word_documents/hello_world');

        return Redirect::to(public_path().'/hello_world');
    }         
}