# timetics/1.0.63/vendor/themewinter/email-notification-sdk/src/Base/ForwardCalls.php

Timetics – Appointment Booking Calendar &amp; Scheduling, version 1.0.63. 57 lines.

- Page: https://pluginprobe.com/plugins/timetics/1.0.63/code/vendor/themewinter/email-notification-sdk/src/Base/ForwardCalls.php
- Raw: https://pluginprobe.com/plugins/timetics/1.0.63/raw/vendor/themewinter/email-notification-sdk/src/Base/ForwardCalls.php
- Modified: 2026-06-28T06:36:30+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/timetics/1.0.63/code/vendor/themewinter/email-notification-sdk/src/Base/ForwardCalls.php#L10-L20`.

```php
<?php

namespace Ens\Base;

use BadMethodCallException;
use Ens\Base\PostModel;

/**
 * ForwardCalls Trait
 *
 * @since 1.0.0
 *
 * @package ENS
 */
trait ForwardCalls {

    /**
     * Handle dynamic method
     *
     * @since 1.0.0
     *
     * @param   PostModel  $model
     * @param   string $method
     * @param   mixed $params
     *
     * @return  mixed
     */
    protected static function forward_call_to_static( PostModel $model, $method, $params ) {
        try {
            $post = new Post( $model );

            return $post->$method( ...$params );

        } catch ( BadMethodCallException $e ) {
            static::throw_bad_method_call_exception( $method );
        }
    }

    /**
     * Throw a bad method call exception for the given method.
     *
     * @since 1.0.0
     *
     * @param  string  $method
     * @return void
     *
     * @throws \BadMethodCallException
     */
    protected static function throw_bad_method_call_exception( $method ) {
        throw new BadMethodCallException( esc_html( sprintf(
            // translators: %1$s is the class name, %2$s is the method name
            'Call to undefined method %1$s::%2$s()',
            static::class,
            $method
        ) ) );
    }
}
```
