Hello,
I have a file (01.php)
<?php
abstract class Sender
{
const E_NEW_APPOINTMENT = 1;
/**
* Send instant confirmation/notification emails.
*
* @param int $type (E_NEW_APPOINTMENT)
* @param CustomerAppointment $ca
*/
public static function sendEmails( $type, CustomerAppointment $ca )
{
list ( $codes, $staff, $appointment, $customer ) = self::_prepareData( $ca );
switch ( $type ) {
case self::E_NEW_APPOINTMENT:
$to_client = new Notification();
$to_client->loadBy( array( 'slug' => 'client_info' ) );
$to_staff = new Notification();
$to_staff->loadBy( array( 'slug' => 'provider_info' ) );
$confirmed_appointment= $codes->set( 'confirmed', $ca->get( 'confirmed' ) );
if ( $to_staff->get( 'active' ) AND $ca->get( 'confirmed' )==1 ) {
// Send email notification to staff member (and admins if necessary).
self::_send( $to_staff, $codes, $staff->get( 'email' ) );
}
break;
}
}
}
?>
And another file (02.php)
<?php
require "http://abc.com/01.php";
sendEmails(E_NEW_APPOINTMENT, $ca);
?>
In this case, how can I call the "public static function sendEmails" in file 01.php ?
Thank you.