How do you access ProcessWire API from an external file? I wrote a class and I need to use the API from there...my php file is in templates/includes/file.php
<?php namespace ProcessWire;
include_once('../../../index.php');
class myClass {
private function ($query){
return $sanitizer->selectorValue($query);
}
}
I get this error: Call to a member function selectorValue() on a non-object