View_PDF::factory PHP Method

factory() public static method

public static factory ( $file = NULL, array $data = NULL )
$data array
    public static function factory($file = NULL, array $data = NULL)
    {
        return new View_PDF($file, $data);
    }

Usage Example

Esempio n. 1
0
 public function action_index()
 {
     // Load the user information
     //  $user = Auth::instance()->get_user();
     $config = array('author' => 'Shanmugan', 'title' => 'Test', 'subject' => 'Pdf', 'name' => Text::random() . '.pdf');
     $name = "Shan";
     View_PDF::factory('welcome/info', $config)->set("name", $name)->render();
     $this->template->content = View::factory('welcome/info')->bind('name', $name);
     // if a user is not logged in, redirect to login page
     //        if (!$user) {
     //            $this->redirect('welcome/login');
     //        }
 }
All Usage Examples Of View_PDF::factory