We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    you could also just do this:

    require_once 'path/to/MyClassName.class.php';
     
    // send the class instance to a modx var if it hasn't been called already
    if ( !isset($modx->myClass) )
    {
        $modx->myClass= new MyClassName;
    }
     
    $output = $modx->myClass->myMethodName($parameters);
    $output .= $modx->myClass->myOtherMethodName($parameters);
    return $output;
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!