"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'programs.has_certification' in 'field list'"
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
app
/
core
/
PDOStatementDebugger.php
<?php
namespace Core;
 
use PDOStatement;
 
class PDOStatementDebugger extends PDOStatement
{
    protected $_debugValues = null;
 
    protected function __construct()
    {
        // need this empty construct()!
    }
 
    public function execute($values = array())
    {
        $this->_debugValues = $values;
        try {
            $t = parent::execute($values);
            // maybe do some logging here?
        } catch (PDOException $e) {
            // maybe do some logging here?
            throw $e;
        }
 
        return $t;
    }
 
    public function debugQuery($replaced = true)
    {
        $q = $this->queryString;
 
        if (!$replaced) {
            return $q;
        }
 
        return preg_replace_callback('/:([0-9a-z_]+)/i', array($this, 'debugReplace'), $q);
    }
 
    protected function debugReplace($m)
Arguments
  1. array:1 [
      "program_id" => "ot"
    ]
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
app
/
models
/
ProgramModel.php
                                        programs.monthly_standard_savings,
                                        programs.monthly_standard_min_down_payment,
                                        programs.monthly_standard_min_monthly_payment,
                                        programs.monthly_preferred_tuition,
                                        programs.monthly_preferred_savings,
                                        programs.monthly_preferred_min_down_payment,
                                        programs.monthly_preferred_min_monthly_payment,
                                        programs.auto_pay_discount,
 
                                        program_areas.title as area_title,
                                        program_degrees.title as degree_title,
                                        programs.down_payment AS min_down_payment,
                                        programs.monthly_payment AS min_monthly_payment,
                                        programs.related_programs
                                    FROM programs
                                    LEFT JOIN program_areas ON programs.program_area_id = program_areas.id
                                    LEFT JOIN program_degrees ON programs.program_degree_id = program_degrees.id
                                    WHERE programs.program_code = :program_id");
 
        $r = $q->execute(['program_id' => $program_id]);
        return $q->fetchObject();
    }
 
//------------------------------------------------------------------------------------
 
/**
 * Updates program
 * @param  array $data
 * @return integer       last update id
 */
 
    public function update($data)
    {
        $vals = $this->getSetStatement($data);
 
        $q = $this->db->prepare("UPDATE programs SET  $vals,
                                                      date_updated      = UTC_TIMESTAMP()
                                 WHERE id = :id");
 
         return $q->execute($data);
Arguments
  1. array:1 [
      "program_id" => "ot"
    ]
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
app
/
libraries
/
Program.php
    public function getTitle($id)
    {
        $p = $this->program_model->getByProgramId($id);
 
        if($p !== false)
        {
            return $p->title;
        }
 
        return '';
    }
 
    public function getById($id, $schoolId)
    {
        if($schoolId)
        {
            return $this->program_model->getByProgramIdAndSchoolId($id, $schoolId);
 
        }
        return $this->program_model->getByProgramId($id);
    }
 
    public function fetchAll($school_id)
    {
        return $this->program_model->fetchAllBySchool($school_id);
    }
 
    public function fetchAreas()
    {
 
        $data = $this->program_model->fetchAreas();
 
        // reformat data
        if($data)
        {
            foreach($data as $el)
            {
                $new[$el['id']] = $el;
            }
            return $new;
Arguments
  1. "ot"
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
app
/
controllers
/
tags
/
ProgramTagController.php
        $view = [];
        $view['content_view'] = ($json === false) ? '{}': json_encode($json, JSON_NUMERIC_CHECK);
 
        // create new response headers
        $res = $this->view->getResponse($res, 'wrappers/wrapper_blank_view.php', $view);
        $res = $res
               ->withStatus(200)
               ->withHeader('Content-Type', 'application/json')
               ->withHeader('X-PCDI', $this->input->get('school', 'A'))
               ->withHeader('Cache-Control', 'max-age=3600'); // 60 minutes
 
        return $res;
    }
 
    public function getProgram($req, $res, $args)
    {
        $id = $args['id'];
        $program = new Program(new ProgramModel($this->db));
 
        $json = $program->getById($id, $this->input->get('school'));
        $view = [];
        $view['content_view'] = ($json === false) ? '{}': json_encode($json, JSON_NUMERIC_CHECK);
 
        // create new response headers
        $res = $this->view->getResponse($res, 'wrappers/wrapper_blank_view.php', $view);
        $res = $res->withStatus(200)->withHeader('Content-Type', 'application/json');
        return $res;
    }
 
    public function getPrograms($req, $res, $args)
    {
        $program = new Program(new ProgramModel($this->db));
 
        // get school id , default to A if none exists
        $json = $program->fetchAll($this->input->get('school', 'A'));
        $view = [];
        $view['content_view'] = ($json === false) ? '{}': json_encode($json, JSON_NUMERIC_CHECK);
 
        // create new response headers
        $res = $this->view->getResponse($res, 'wrappers/wrapper_blank_view.php', $view);
Arguments
  1. "ot"
    
  2. null
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
Handlers
/
Strategies
/
RequestResponse.php
     * as an array of arguments.
     *
     * @param array|callable         $callable
     * @param ServerRequestInterface $request
     * @param ResponseInterface      $response
     * @param array                  $routeArguments
     *
     * @return mixed
     */
    public function __invoke(
        callable $callable,
        ServerRequestInterface $request,
        ResponseInterface $response,
        array $routeArguments
    ) {
        foreach ($routeArguments as $k => $v) {
            $request = $request->withAttribute($k, $v);
        }
 
        return call_user_func($callable, $request, $response, $routeArguments);
    }
}
 
Arguments
  1. Request {#197}
    
  2. Response {#165}
    
  3. array:1 [
      "id" => "ot"
    ]
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
Handlers
/
Strategies
/
RequestResponse.php
     * as an array of arguments.
     *
     * @param array|callable         $callable
     * @param ServerRequestInterface $request
     * @param ResponseInterface      $response
     * @param array                  $routeArguments
     *
     * @return mixed
     */
    public function __invoke(
        callable $callable,
        ServerRequestInterface $request,
        ResponseInterface $response,
        array $routeArguments
    ) {
        foreach ($routeArguments as $k => $v) {
            $request = $request->withAttribute($k, $v);
        }
 
        return call_user_func($callable, $request, $response, $routeArguments);
    }
}
 
Arguments
  1. array:2 [
      0 => ProgramTagController {#203}
      1 => "getProgram"
    ]
    
  2. Request {#197}
    
  3. Response {#165}
    
  4. array:1 [
      "id" => "ot"
    ]
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
Route.php
     *
     * @param ServerRequestInterface $request  The current Request object
     * @param ResponseInterface      $response The current Response object
     * @return \Psr\Http\Message\ResponseInterface
     * @throws \Exception  if the route callable throws an exception
     */
    public function __invoke(ServerRequestInterface $request, ResponseInterface $response)
    {
        $this->callable = $this->resolveCallable($this->callable);
 
        /** @var InvocationStrategyInterface $handler */
        $handler = isset($this->container) ? $this->container->get('foundHandler') : new RequestResponse();
 
        // invoke route callable
        if ($this->outputBuffering === false) {
            $newResponse = $handler($this->callable, $request, $response, $this->arguments);
        } else {
            try {
                ob_start();
                $newResponse = $handler($this->callable, $request, $response, $this->arguments);
                $output = ob_get_clean();
            // @codeCoverageIgnoreStart
            } catch (Throwable $e) {
                ob_end_clean();
                throw $e;
            // @codeCoverageIgnoreEnd
            } catch (Exception $e) {
                ob_end_clean();
                throw $e;
            }
        }
 
        if ($newResponse instanceof ResponseInterface) {
            // if route callback returns a ResponseInterface, then use it
            $response = $newResponse;
        } elseif (is_string($newResponse)) {
            // if route callback returns a string, then append it to the response
            if ($response->getBody()->isWritable()) {
                $response->getBody()->write($newResponse);
            }
Arguments
  1. array:2 [
      0 => ProgramTagController {#203}
      1 => "getProgram"
    ]
    
  2. Request {#197}
    
  3. Response {#165}
    
  4. array:1 [
      "id" => "ot"
    ]
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
MiddlewareAwareTrait.php
        $this->stack[] = $kernel;
    }
 
    /**
     * Call middleware stack
     *
     * @param  ServerRequestInterface $request A request object
     * @param  ResponseInterface      $response A response object
     *
     * @return ResponseInterface
     */
    public function callMiddlewareStack(ServerRequestInterface $request, ResponseInterface $response)
    {
        if (is_null($this->stack)) {
            $this->seedMiddlewareStack();
        }
        /** @var callable $start */
        $start = $this->stack->top();
        $this->middlewareLock = true;
        $response = $start($request, $response);
        $this->middlewareLock = false;
        return $response;
    }
}
 
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
Route.php
 
    /**
     * Run route
     *
     * This method traverses the middleware stack, including the route's callable
     * and captures the resultant HTTP response object. It then sends the response
     * back to the Application.
     *
     * @param ServerRequestInterface $request
     * @param ResponseInterface      $response
     *
     * @return ResponseInterface
     */
    public function run(ServerRequestInterface $request, ResponseInterface $response)
    {
        // Finalise route now that we are about to run it
        $this->finalize();
 
        // Traverse middleware stack and fetch updated response
        return $this->callMiddlewareStack($request, $response);
    }
 
    /**
     * Dispatch route callable against current Request and Response objects
     *
     * This method invokes the route object's callable. If middleware is
     * registered for the route, each callable middleware is invoked in
     * the order specified.
     *
     * @param ServerRequestInterface $request  The current Request object
     * @param ResponseInterface      $response The current Response object
     * @return \Psr\Http\Message\ResponseInterface
     * @throws \Exception  if the route callable throws an exception
     */
    public function __invoke(ServerRequestInterface $request, ResponseInterface $response)
    {
        $this->callable = $this->resolveCallable($this->callable);
 
        /** @var InvocationStrategyInterface $handler */
        $handler = isset($this->container) ? $this->container->get('foundHandler') : new RequestResponse();
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
App.php
     * @throws MethodNotAllowedException
     * @throws NotFoundException
     */
    public function __invoke(ServerRequestInterface $request, ResponseInterface $response)
    {
        // Get the route info
        $routeInfo = $request->getAttribute('routeInfo');
 
        /** @var \Slim\Interfaces\RouterInterface $router */
        $router = $this->container->get('router');
 
        // If router hasn't been dispatched or the URI changed then dispatch
        if (null === $routeInfo || ($routeInfo['request'] !== [$request->getMethod(), (string) $request->getUri()])) {
            $request = $this->dispatchRouterAndPrepareRoute($request, $router);
            $routeInfo = $request->getAttribute('routeInfo');
        }
 
        if ($routeInfo[0] === Dispatcher::FOUND) {
            $route = $router->lookupRoute($routeInfo[1]);
            return $route->run($request, $response);
        } elseif ($routeInfo[0] === Dispatcher::METHOD_NOT_ALLOWED) {
            if (!$this->container->has('notAllowedHandler')) {
                throw new MethodNotAllowedException($request, $response, $routeInfo[1]);
            }
            /** @var callable $notAllowedHandler */
            $notAllowedHandler = $this->container->get('notAllowedHandler');
            return $notAllowedHandler($request, $response, $routeInfo[1]);
        }
 
        if (!$this->container->has('notFoundHandler')) {
            throw new NotFoundException($request, $response);
        }
        /** @var callable $notFoundHandler */
        $notFoundHandler = $this->container->get('notFoundHandler');
        return $notFoundHandler($request, $response);
    }
 
    /**
     * Perform a sub-request from within an application route
     *
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
zeuxisoo
/
slim-whoops
/
src
/
Zeuxisoo
/
Whoops
/
Provider
/
Slim
/
WhoopsMiddleware.php
 
            // Set Whoops to default exception handler
            $whoops = new \Whoops\Run;
            $whoops->pushHandler($prettyPageHandler);
 
            // Enable JsonResponseHandler when request is AJAX
            if (Misc::isAjaxRequest()){
                $whoops->pushHandler(new JsonResponseHandler());
            }
 
            $whoops->register();
 
            $container['errorHandler'] = function() use ($whoops) {
                return new WhoopsErrorHandler($whoops);
            };
 
            $container['whoops'] = $whoops;
        }
 
        return $app($request, $response);
    }
 
}
 
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
DeferredCallable.php
     * DeferredMiddleware constructor.
     * @param callable|string $callable
     * @param ContainerInterface $container
     */
    public function __construct($callable, ContainerInterface $container = null)
    {
        $this->callable = $callable;
        $this->container = $container;
    }
 
    public function __invoke()
    {
        $callable = $this->resolveCallable($this->callable);
        if ($callable instanceof Closure) {
            $callable = $callable->bindTo($this->container);
        }
 
        $args = func_get_args();
 
        return call_user_func_array($callable, $args);
    }
}
 
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
  3. App {#29}
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
DeferredCallable.php
     * DeferredMiddleware constructor.
     * @param callable|string $callable
     * @param ContainerInterface $container
     */
    public function __construct($callable, ContainerInterface $container = null)
    {
        $this->callable = $callable;
        $this->container = $container;
    }
 
    public function __invoke()
    {
        $callable = $this->resolveCallable($this->callable);
        if ($callable instanceof Closure) {
            $callable = $callable->bindTo($this->container);
        }
 
        $args = func_get_args();
 
        return call_user_func_array($callable, $args);
    }
}
 
Arguments
  1. WhoopsMiddleware {#30}
    
  2. array:3 [
      0 => Request {#180}
      1 => Response {#165}
      2 => App {#29}
    ]
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
MiddlewareAwareTrait.php
     * @throws UnexpectedValueException If the middleware doesn't return a Psr\Http\Message\ResponseInterface
     */
    protected function addMiddleware(callable $callable)
    {
        if ($this->middlewareLock) {
            throw new RuntimeException('Middleware can’t be added once the stack is dequeuing');
        }
 
        if (is_null($this->stack)) {
            $this->seedMiddlewareStack();
        }
        $next = $this->stack->top();
        $this->stack[] = function (
            ServerRequestInterface $request,
            ResponseInterface $response
        ) use (
            $callable,
            $next
        ) {
            $result = call_user_func($callable, $request, $response, $next);
            if ($result instanceof ResponseInterface === false) {
                throw new UnexpectedValueException(
                    'Middleware must return instance of \Psr\Http\Message\ResponseInterface'
                );
            }
 
            return $result;
        };
 
        return $this;
    }
 
    /**
     * Seed middleware stack with first callable
     *
     * @param callable $kernel The last item to run as middleware
     *
     * @throws RuntimeException if the stack is seeded more than once
     */
    protected function seedMiddlewareStack(callable $kernel = null)
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
  3. App {#29}
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
MiddlewareAwareTrait.php
     * @throws UnexpectedValueException If the middleware doesn't return a Psr\Http\Message\ResponseInterface
     */
    protected function addMiddleware(callable $callable)
    {
        if ($this->middlewareLock) {
            throw new RuntimeException('Middleware can’t be added once the stack is dequeuing');
        }
 
        if (is_null($this->stack)) {
            $this->seedMiddlewareStack();
        }
        $next = $this->stack->top();
        $this->stack[] = function (
            ServerRequestInterface $request,
            ResponseInterface $response
        ) use (
            $callable,
            $next
        ) {
            $result = call_user_func($callable, $request, $response, $next);
            if ($result instanceof ResponseInterface === false) {
                throw new UnexpectedValueException(
                    'Middleware must return instance of \Psr\Http\Message\ResponseInterface'
                );
            }
 
            return $result;
        };
 
        return $this;
    }
 
    /**
     * Seed middleware stack with first callable
     *
     * @param callable $kernel The last item to run as middleware
     *
     * @throws RuntimeException if the stack is seeded more than once
     */
    protected function seedMiddlewareStack(callable $kernel = null)
Arguments
  1. DeferredCallable {#31}
    
  2. Request {#180}
    
  3. Response {#165}
    
  4. App {#29}
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
app
/
middleware
/
AuthMiddleware.php
        $name = $route->getName();
        $groups = $route->getGroups();
        //$methods = $route->getMethods();
        //$arguments = $route->getArguments();
 
        /*
        dump($request);
        dump($name);
        dump($groups[0]->getPattern());
        dump(get_class_methods($groups[0]));
        dump($methods);
        dump($arguments);
        */
 
        if ($this->isPublic($name, $this->publicRoutes)) {
            return $next($request, $response);
        }
 
        if ($this->isPublic($groups[0]->getPattern(), $this->publicGroups)) {
            return $next($request, $response);
        }
 
        if ($this->sentry->isLoggedIn()) {
            return $next($request, $response);
        }
 
        $this->alert->addFlash("Please login!");
 
        return $response->withRedirect(
            $this->router->pathFor(
                $this->loginRoute
            )
        );
    }
 
/**
 * Checks if element is in array
 * @param  string  $name         name of needle
 * @param  array  $publicRoutes  haystack to search
 * @return boolean
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
DeferredCallable.php
     * DeferredMiddleware constructor.
     * @param callable|string $callable
     * @param ContainerInterface $container
     */
    public function __construct($callable, ContainerInterface $container = null)
    {
        $this->callable = $callable;
        $this->container = $container;
    }
 
    public function __invoke()
    {
        $callable = $this->resolveCallable($this->callable);
        if ($callable instanceof Closure) {
            $callable = $callable->bindTo($this->container);
        }
 
        $args = func_get_args();
 
        return call_user_func_array($callable, $args);
    }
}
 
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
  3. Closure {#33
      class: "Slim\App"
      this: App {#29 …}
      parameters: {
        $request: {
          typeHint: "Psr\Http\Message\ServerRequestInterface"
        }
        $response: {
          typeHint: "Psr\Http\Message\ResponseInterface"
        }
      }
      use: {
        $callable: DeferredCallable {#31 …}
        $next: App {#29 …}
      }
    }
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
DeferredCallable.php
     * DeferredMiddleware constructor.
     * @param callable|string $callable
     * @param ContainerInterface $container
     */
    public function __construct($callable, ContainerInterface $container = null)
    {
        $this->callable = $callable;
        $this->container = $container;
    }
 
    public function __invoke()
    {
        $callable = $this->resolveCallable($this->callable);
        if ($callable instanceof Closure) {
            $callable = $callable->bindTo($this->container);
        }
 
        $args = func_get_args();
 
        return call_user_func_array($callable, $args);
    }
}
 
Arguments
  1. AuthMiddleware {#34}
    
  2. array:3 [
      0 => Request {#180}
      1 => Response {#165}
      2 => Closure {#33
        class: "Slim\App"
        this: App {#29 …}
        parameters: {
          $request: {
            typeHint: "Psr\Http\Message\ServerRequestInterface"
          }
          $response: {
            typeHint: "Psr\Http\Message\ResponseInterface"
          }
        }
        use: {
          $callable: DeferredCallable {#31 …}
          $next: App {#29 …}
        }
      }
    ]
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
MiddlewareAwareTrait.php
     * @throws UnexpectedValueException If the middleware doesn't return a Psr\Http\Message\ResponseInterface
     */
    protected function addMiddleware(callable $callable)
    {
        if ($this->middlewareLock) {
            throw new RuntimeException('Middleware can’t be added once the stack is dequeuing');
        }
 
        if (is_null($this->stack)) {
            $this->seedMiddlewareStack();
        }
        $next = $this->stack->top();
        $this->stack[] = function (
            ServerRequestInterface $request,
            ResponseInterface $response
        ) use (
            $callable,
            $next
        ) {
            $result = call_user_func($callable, $request, $response, $next);
            if ($result instanceof ResponseInterface === false) {
                throw new UnexpectedValueException(
                    'Middleware must return instance of \Psr\Http\Message\ResponseInterface'
                );
            }
 
            return $result;
        };
 
        return $this;
    }
 
    /**
     * Seed middleware stack with first callable
     *
     * @param callable $kernel The last item to run as middleware
     *
     * @throws RuntimeException if the stack is seeded more than once
     */
    protected function seedMiddlewareStack(callable $kernel = null)
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
  3. Closure {#33
      class: "Slim\App"
      this: App {#29 …}
      parameters: {
        $request: {
          typeHint: "Psr\Http\Message\ServerRequestInterface"
        }
        $response: {
          typeHint: "Psr\Http\Message\ResponseInterface"
        }
      }
      use: {
        $callable: DeferredCallable {#31 …}
        $next: App {#29 …}
      }
    }
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
MiddlewareAwareTrait.php
     * @throws UnexpectedValueException If the middleware doesn't return a Psr\Http\Message\ResponseInterface
     */
    protected function addMiddleware(callable $callable)
    {
        if ($this->middlewareLock) {
            throw new RuntimeException('Middleware can’t be added once the stack is dequeuing');
        }
 
        if (is_null($this->stack)) {
            $this->seedMiddlewareStack();
        }
        $next = $this->stack->top();
        $this->stack[] = function (
            ServerRequestInterface $request,
            ResponseInterface $response
        ) use (
            $callable,
            $next
        ) {
            $result = call_user_func($callable, $request, $response, $next);
            if ($result instanceof ResponseInterface === false) {
                throw new UnexpectedValueException(
                    'Middleware must return instance of \Psr\Http\Message\ResponseInterface'
                );
            }
 
            return $result;
        };
 
        return $this;
    }
 
    /**
     * Seed middleware stack with first callable
     *
     * @param callable $kernel The last item to run as middleware
     *
     * @throws RuntimeException if the stack is seeded more than once
     */
    protected function seedMiddlewareStack(callable $kernel = null)
Arguments
  1. DeferredCallable {#42}
    
  2. Request {#180}
    
  3. Response {#165}
    
  4. Closure {#33
      class: "Slim\App"
      this: App {#29 …}
      parameters: {
        $request: {
          typeHint: "Psr\Http\Message\ServerRequestInterface"
        }
        $response: {
          typeHint: "Psr\Http\Message\ResponseInterface"
        }
      }
      use: {
        $callable: DeferredCallable {#31 …}
        $next: App {#29 …}
      }
    }
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
eko3alpha
/
slim-cors-middleware
/
src
/
CorsMiddleware.php
{
    protected $cors;
 
    public function __construct($cors)
    {
        $this->cors = $cors;
    }
 
/**
 * Middleware invokable class
 *
 * @param  RequestInterface     $request  PSR7 request
 * @param  ResponseInterface    $response PSR7 response
 * @param  callable             $next     Next middleware
 *
 * @return ResponseInterface
 */
    public function __invoke(RequestInterface $request, ResponseInterface $response, callable $next)
    {
        $response = $next($request, $response);
        $origin = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : 'none';
        return $this->getResponse($response, $origin, $this->cors);
    }
 
/**
* Gets allow method string
* @param  array    $cors   access list with methods
* @param  string   $origin origin domain
* @return string           comma delimited string of methods
*/
    private function getAllowedMethodsString($cors, $origin)
    {
        $methods = $cors[$origin];
        if (is_array($methods)) {
            $methods = implode(', ', $methods);
        }
        return $methods;
    }
 
/**
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
DeferredCallable.php
     * DeferredMiddleware constructor.
     * @param callable|string $callable
     * @param ContainerInterface $container
     */
    public function __construct($callable, ContainerInterface $container = null)
    {
        $this->callable = $callable;
        $this->container = $container;
    }
 
    public function __invoke()
    {
        $callable = $this->resolveCallable($this->callable);
        if ($callable instanceof Closure) {
            $callable = $callable->bindTo($this->container);
        }
 
        $args = func_get_args();
 
        return call_user_func_array($callable, $args);
    }
}
 
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
  3. Closure {#43
      class: "Slim\App"
      this: App {#29 …}
      parameters: {
        $request: {
          typeHint: "Psr\Http\Message\ServerRequestInterface"
        }
        $response: {
          typeHint: "Psr\Http\Message\ResponseInterface"
        }
      }
      use: {
        $callable: DeferredCallable {#42 …}
        $next: Closure {#33 …}
      }
    }
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
DeferredCallable.php
     * DeferredMiddleware constructor.
     * @param callable|string $callable
     * @param ContainerInterface $container
     */
    public function __construct($callable, ContainerInterface $container = null)
    {
        $this->callable = $callable;
        $this->container = $container;
    }
 
    public function __invoke()
    {
        $callable = $this->resolveCallable($this->callable);
        if ($callable instanceof Closure) {
            $callable = $callable->bindTo($this->container);
        }
 
        $args = func_get_args();
 
        return call_user_func_array($callable, $args);
    }
}
 
Arguments
  1. CorsMiddleware {#44}
    
  2. array:3 [
      0 => Request {#180}
      1 => Response {#165}
      2 => Closure {#43
        class: "Slim\App"
        this: App {#29 …}
        parameters: {
          $request: {
            typeHint: "Psr\Http\Message\ServerRequestInterface"
          }
          $response: {
            typeHint: "Psr\Http\Message\ResponseInterface"
          }
        }
        use: {
          $callable: DeferredCallable {#42 …}
          $next: Closure {#33 …}
        }
      }
    ]
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
MiddlewareAwareTrait.php
     * @throws UnexpectedValueException If the middleware doesn't return a Psr\Http\Message\ResponseInterface
     */
    protected function addMiddleware(callable $callable)
    {
        if ($this->middlewareLock) {
            throw new RuntimeException('Middleware can’t be added once the stack is dequeuing');
        }
 
        if (is_null($this->stack)) {
            $this->seedMiddlewareStack();
        }
        $next = $this->stack->top();
        $this->stack[] = function (
            ServerRequestInterface $request,
            ResponseInterface $response
        ) use (
            $callable,
            $next
        ) {
            $result = call_user_func($callable, $request, $response, $next);
            if ($result instanceof ResponseInterface === false) {
                throw new UnexpectedValueException(
                    'Middleware must return instance of \Psr\Http\Message\ResponseInterface'
                );
            }
 
            return $result;
        };
 
        return $this;
    }
 
    /**
     * Seed middleware stack with first callable
     *
     * @param callable $kernel The last item to run as middleware
     *
     * @throws RuntimeException if the stack is seeded more than once
     */
    protected function seedMiddlewareStack(callable $kernel = null)
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
  3. Closure {#43
      class: "Slim\App"
      this: App {#29 …}
      parameters: {
        $request: {
          typeHint: "Psr\Http\Message\ServerRequestInterface"
        }
        $response: {
          typeHint: "Psr\Http\Message\ResponseInterface"
        }
      }
      use: {
        $callable: DeferredCallable {#42 …}
        $next: Closure {#33 …}
      }
    }
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
MiddlewareAwareTrait.php
     * @throws UnexpectedValueException If the middleware doesn't return a Psr\Http\Message\ResponseInterface
     */
    protected function addMiddleware(callable $callable)
    {
        if ($this->middlewareLock) {
            throw new RuntimeException('Middleware can’t be added once the stack is dequeuing');
        }
 
        if (is_null($this->stack)) {
            $this->seedMiddlewareStack();
        }
        $next = $this->stack->top();
        $this->stack[] = function (
            ServerRequestInterface $request,
            ResponseInterface $response
        ) use (
            $callable,
            $next
        ) {
            $result = call_user_func($callable, $request, $response, $next);
            if ($result instanceof ResponseInterface === false) {
                throw new UnexpectedValueException(
                    'Middleware must return instance of \Psr\Http\Message\ResponseInterface'
                );
            }
 
            return $result;
        };
 
        return $this;
    }
 
    /**
     * Seed middleware stack with first callable
     *
     * @param callable $kernel The last item to run as middleware
     *
     * @throws RuntimeException if the stack is seeded more than once
     */
    protected function seedMiddlewareStack(callable $kernel = null)
Arguments
  1. DeferredCallable {#45}
    
  2. Request {#180}
    
  3. Response {#165}
    
  4. Closure {#43
      class: "Slim\App"
      this: App {#29 …}
      parameters: {
        $request: {
          typeHint: "Psr\Http\Message\ServerRequestInterface"
        }
        $response: {
          typeHint: "Psr\Http\Message\ResponseInterface"
        }
      }
      use: {
        $callable: DeferredCallable {#42 …}
        $next: Closure {#33 …}
      }
    }
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
MiddlewareAwareTrait.php
        $this->stack[] = $kernel;
    }
 
    /**
     * Call middleware stack
     *
     * @param  ServerRequestInterface $request A request object
     * @param  ResponseInterface      $response A response object
     *
     * @return ResponseInterface
     */
    public function callMiddlewareStack(ServerRequestInterface $request, ResponseInterface $response)
    {
        if (is_null($this->stack)) {
            $this->seedMiddlewareStack();
        }
        /** @var callable $start */
        $start = $this->stack->top();
        $this->middlewareLock = true;
        $response = $start($request, $response);
        $this->middlewareLock = false;
        return $response;
    }
}
 
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
App.php
     * @throws MethodNotAllowedException
     * @throws NotFoundException
     */
    public function process(ServerRequestInterface $request, ResponseInterface $response)
    {
        // Ensure basePath is set
        $router = $this->container->get('router');
        if (is_callable([$request->getUri(), 'getBasePath']) && is_callable([$router, 'setBasePath'])) {
            $router->setBasePath($request->getUri()->getBasePath());
        }
 
        // Dispatch the Router first if the setting for this is on
        if ($this->container->get('settings')['determineRouteBeforeAppMiddleware'] === true) {
            // Dispatch router (note: you won't be able to alter routes after this)
            $request = $this->dispatchRouterAndPrepareRoute($request, $router);
        }
 
        // Traverse middleware stack
        try {
            $response = $this->callMiddlewareStack($request, $response);
        } catch (Exception $e) {
            $response = $this->handleException($e, $request, $response);
        } catch (Throwable $e) {
            $response = $this->handlePhpError($e, $request, $response);
        }
 
        $response = $this->finalize($response);
 
        return $response;
    }
 
    /**
     * Send the response the client
     *
     * @param ResponseInterface $response
     */
    public function respond(ResponseInterface $response)
    {
        // Send response
        if (!headers_sent()) {
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
vendor
/
slim
/
slim
/
Slim
/
App.php
 
    /**
     * Run application
     *
     * This method traverses the application middleware stack and then sends the
     * resultant Response object to the HTTP client.
     *
     * @param bool|false $silent
     * @return ResponseInterface
     *
     * @throws Exception
     * @throws MethodNotAllowedException
     * @throws NotFoundException
     */
    public function run($silent = false)
    {
        $response = $this->container->get('response');
 
        try {
            $response = $this->process($this->container->get('request'), $response);
        } catch (InvalidMethodException $e) {
            $response = $this->processInvalidMethod($e->getRequest(), $response);
        }
 
        if (!$silent) {
            $this->respond($response);
        }
 
        return $response;
    }
 
    /**
     * Pull route info for a request with a bad method to decide whether to
     * return a not-found error (default) or a bad-method error, then run
     * the handler for that error, returning the resulting response.
     *
     * Used for cases where an incoming request has an unrecognized method,
     * rather than throwing an exception and not catching it all the way up.
     *
     * @param ServerRequestInterface $request
Arguments
  1. Request {#180}
    
  2. Response {#165}
    
/
var
/
www
/
cms.pcdi.edu
/
httpdocs
/
public
/
index.php
require_once '../app/services/bootstrap.php';
 
$app = new App($c);
 
$app->add(new WhoopsMiddleware);
$app->add(new AuthMiddleware(
    $c['router'],
    $c['sentry'],
    $c['alert'],
    $c['auth']
));
$app->add(new CorsMiddleware($c['cors']));
 
// CSRF Guard for slim 3.0
//$app->add(new \Slim\Csrf\Guard);
 
require_once '../app/routes/bootstrap.php';
 
// init
$app->run();
 

Environment & details:

Key Value
Application Class
"Slim\App"
Script Name
"/index.php"
Request URI
"<none>"
Key Value
Accept Charset
"<none>"
Content Charset
"<none>"
Path
"/programs/dump/id/ot/"
Query String
"<none>"
HTTP Method
"GET"
Base URL
"http://ashworth:Study!987@cms.pcdi.edu/programs/dump/id/ot/"
Scheme
"http"
Port
null
Host
"cms.pcdi.edu"
empty
empty
empty
empty
empty
Key Value
USER
"www-data"
HOME
"/var/www"
ORIG_SCRIPT_NAME
"/php7.1-fcgi"
ORIG_PATH_TRANSLATED
"/var/www/cms.pcdi.edu/httpdocs/public/index.php"
ORIG_PATH_INFO
"/index.php"
ORIG_SCRIPT_FILENAME
"/usr/lib/cgi-bin/php7.1-fcgi"
SCRIPT_NAME
"/index.php"
REQUEST_URI
"/programs/dump/id/ot/"
QUERY_STRING
""
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.1"
GATEWAY_INTERFACE
"CGI/1.1"
HTTP_AUTHORIZATION
"Basic YXNod29ydGg6U3R1ZHkhOTg3"
REDIRECT_URL
"/index.php"
REMOTE_PORT
"45856"
SCRIPT_FILENAME
"/var/www/cms.pcdi.edu/httpdocs/public/index.php"
SERVER_ADMIN
"[no address given]"
CONTEXT_DOCUMENT_ROOT
"/usr/lib/cgi-bin/php7.1-fcgi"
CONTEXT_PREFIX
"/php7.1-fcgi"
REQUEST_SCHEME
"http"
DOCUMENT_ROOT
"/var/www/cms.pcdi.edu/httpdocs/public"
REMOTE_ADDR
"166.78.99.138"
SERVER_PORT
"80"
SERVER_ADDR
"166.78.99.138"
SERVER_NAME
"cms.pcdi.edu"
SERVER_SOFTWARE
" "
SERVER_SIGNATURE
""
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
HTTP_ORIGIN
"madison.ashworthcollege.edu"
HTTP_ACCEPT
"*/*"
HTTP_HOST
"cms.pcdi.edu"
UNIQUE_ID
"W3ShI38AAAEAAHpFN5gAAAAp"
REDIRECT_STATUS
"200"
REDIRECT_HANDLER
"php7.1-fcgi"
REDIRECT_UNIQUE_ID
"W3ShI38AAAEAAHpFN5gAAAAp"
REDIRECT_REDIRECT_STATUS
"200"
REDIRECT_REDIRECT_UNIQUE_ID
"W3ShI38AAAEAAHpFN5gAAAAp"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
PHP_AUTH_USER
"ashworth"
PHP_AUTH_PW
"*********"
REQUEST_TIME_FLOAT
1534370083.2371
REQUEST_TIME
1534370083
empty
0. Whoops\Handler\PrettyPageHandler

Occupational Therapy Aide Training

The demand for occupational therapy aides is expected to increase as the need for medical services rises among children, young adults, and senior citizens with unique healthcare needs. Madison School of Healthcare’s Occupational Therapy Aide Training Program can help prepare you to work in various healthcare settings, including occupational therapists’ offices, hospitals, and nursing care facilities. Our program features information regarding medical terminology, the history of the occupational therapy field, the duties of the rehabilitation team, and safety in the healthcare setting — crucial information that helps to ensure a solid foundation within the occupational therapy setting.

Once you complete our program, you’ll graduate having learned the skills required to assist occupational therapists and occupational therapy assistants as they work with patients to improve their quality of life as they recover from injuries or illness. Our flexible, affordable program allows you to work at your own pace. Enroll anytime and graduate in as fast as 4 months.

Curriculum

Lesson Group 1: Orientation: Ashworth College Career Program

Learning at Ashworth

The goals and values of Ashworth College; time management; creating a realistic weekly and monthly study schedule; the nature and purpose of assessments; how to study effectively to prepare for and take an online examination; developing the skill sets necessary for success in the twenty-first century.

Allied Health Careers

Introduction to the basic operations of allied health careers and the legal and ethical issues students may encounter while working in the many different venues available for these fields.

Lesson Group 2: Medical and Body Systems Terminology

Medical Terminology

Introduction to basic medical terminology and word formation; identification of the four major word parts of medical terms; building, defining, and analyzing medical terms.

Body Systems 1

Discussion of the anatomy and physiology of the integumentary, musculoskeletal, digestive, cardiovascular, lymphatic, respiratory, endocrine, and nervous systems; identification of associated terms, conditions, and abbreviations.

Body Systems 2

Discussion of the anatomy and physiology of the urinary and reproductive systems, the specialties of gynecology, obstetrics, and neonatology, and the anatomy of the eyes and ears; identification of associated terms, conditions, and abbreviations.

SHOW ALL CURRICULUM

Program Details

Our online Occupational Therapy Aide program prepares students to support occupational therapists and occupational therapy assistants in helping patients gain the skills necessary to live and work. Students will learn about medical terminology used in the healthcare setting, the history of the occupational therapy field, the occupational therapy aide’s role in patient care, and different equipment used in the occupational therapy setting. Students will complete an adaptive equipment assessment in an occupational therapy setting before finishing the program.

Your Occupational Therapy Aide Training Course Includes:

  • Occupational Therapy Aide Textbook, learning guides, and virtual field trips
  • Hip kit medical aid
  • Instructional and tutorial support from our experienced faculty
  • Membership in Madison’s online student community
  • Interactive student portal that can be accessed anytime and anywhere from your phone, tablet, or computer
  • Job resources and personalized career guidance from our dedicated Career Services team

Being here made me feel a part of something and I really would recommend it for anybody. There is no reason not to go to school, especially with a place like this, because it’s giving you the opportunity to better yourself and gain a sense of accomplishment.

— Susan Donaldson, Recent Graduate

Tuition

Program tuition for Madison’s Occupational Therapy Aide program is affordable and flexible with convenient payment options. Everything you need to succeed is included in your tuition.

Payment Options

BIGGEST SAVINGS

FULL PAY
  • Pay full tuition now
  • Biggest savings
  • No monthly payments

SAVE $

$

CONVENIENT

MONTHLY PAY
  • Monthly payments
  • Start with a low initial payment
  • As low as $ a month

SAVE $

$

Tuition As Low As $ To Start!

Call 1-800-957-5412 or Enroll Online!

ENROLL NOW

Career Outlook

As the health needs of our growing elderly population increases, the demand for skilled occupational therapy aides is on the rise. The U.S. Department of Labor expects a growth rate of 31% through 2024 for occupational therapy aide jobs. Occupational therapy aide careers are rewarding and can lend a great deal of personal satisfaction. You may work with patients with a variety of ailments, from diverse backgrounds and all age groups. If you have a passion for helping others, our program gives you a strong start toward your goal of becoming an occupational therapy aide.

31%
GROWTH
The U.S. Department of Labor predicts 2,700 new occupational therapy aide jobs through 2024.

FAQs

Do I need previous experience or a degree prior to enrolling in Madison’s Occupational Therapy program?

No, you don’t need previous experience or a degree to enroll in Madison’s Occupational Therapy Aide training program. This course was created by industry experts with first-hand knowledge of the occupational therapy setting and the roles of the occupational therapy aide. These courses will give you the information needed to better prepare for an opportunity in the occupational therapy setting.

What features should I look for in the Madison School of Healthcare OT Aide online program compared to other occupational therapy schools’ programs?

It’s important that the program you choose includes the latest information on occupational therapy fundamentals. Look for a program that has only the lesson content you need to know; a program that’s focused on the occupational therapy aide skills you need to start your career. Your program should include lessons on medical terminology, roles and duties of the occupational therapy aide, occupational therapy equipment, and workplace safety and behavior.

Is this Occupational Therapy Aide program all online or do I get books?

The program textbook is shipped to the student. Learning guides are available online.

Are there any in-class or mentorship requirements?

Students in this program are not required to attend any classes in a physical setting, all of the learning events are completed online. There is also no formal mentorship or externship required, however students will complete a project that requires several hours of observation at a rehabilitation facility. Students must locate their own site to complete this assignment.

State Requirements

A career in this field may require you to meet certain licensing, training, and other requirements that can vary by vocation and state. Check with your state, local government, and/or licensing board to find out which requirements may be applicable in your state. Click here for contact information on state licensing/regulatory boards and certain professional licensing information.

Ready to Get Started?

Take the first step towards a rewarding career. Our Occupational Therapy Aide program can help you achieve your goals. Call 1-800-600-6253 or enroll online today.

Career Outlook Source: Occupational Outlook Handbook, 2016-17 Edition, Occupational Therapy Assistants and Aides (January 13, 2016).