Framework Structure - Vendors

Vendors are the third-party libraries that integrated to further extend ApPHP Framework's functionalities. This is a framework-level vendor sub-directory and it contains all third-party modules or libraries which your application may need. The libraries and modules that placed in the vendor sub-directory are not modified from their original, distributed state. As a developer you may use framework-level vendors for your purposes, although it's generally intended for internal use of the framework helpers.

Of course, you may create an application-level vendor sub-directory, that will be used for your application purposes only. In this case you may create a a sub-folder called vendors and place it in protected directory of your application. Find more information about application vendors here.

Currently there are following framework-level vendors:
An example for using of dbug see here.
Below you may see an example that illustrates how CMailer helper uses the phpmailer vendor code from the ApPHP framework:
public static function send($to, $subject, $message, $params = '')
    if(!strcasecmp(self::$_mailer, 'smtpMailer')){
        return self::smtpMailer($to, $subject, $message, $params);
    }elseif(!strcasecmp(self::$_mailer, 'phpMailer')){
        return self::phpMailer($to, $subject, $message, $params);
        return self::phpMail($to, $subject, $message, $params);

Here an example that demonstrates how CPdf helper uses the TCPDF vendor code from the ApPHP framework:
 * Download listing PDF
 * @param int $id
public function downloadPdfAction($id = 0)
    $content = 'here must be HTML code for the PDF document...';
        'page_orientation' 	=> 'P', 	// [P=portrait, L=landscape]
        'unit' 		    	=> 'mm',	// [pt=point, mm=millimeter, cm=centimeter, in=inch]
        'page_format'		=> 'A4',
        'unicode'	        => true,
        'encoding'	        => 'UTF-8',
        'creator'	        => 'AutoPortal',
        'author'	        => 'ApPHP',
        'title'		        => 'Listing #'.$id,
        'subject'	        => 'Listing #'.$id,
        'keywords'	    	=> '',
        //'header_logo'		=> '../../../templates/reports/images/logo.png',
        'header_logo_width'	=> '45',
        'header_title'		=> 'Listing #'.$id,
        'header_enable'		=> false,
        'text_shadow'		=> false,
        'margin_top'		=> '5',
        'margin_left'		=> '5'
    CPdf::createDocument($content, 'Listing #'.$id, 'D'); // 'I' - inline , 'D' - download

Click to find more information about vendors for applications.