"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" => "ha"
    ]
    
/
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" => "ha"
    ]
    
/
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. "ha"
    
/
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. "ha"
    
  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" => "ha"
    ]
    
/
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" => "ha"
    ]
    
/
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" => "ha"
    ]
    
/
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/ha/"
Query String
"<none>"
HTTP Method
"GET"
Base URL
"http://ashworth:Study!987@cms.pcdi.edu/programs/dump/id/ha/"
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/ha/"
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
"52994"
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
"W3Skun8AAAEAABBk66cAAAAS"
REDIRECT_STATUS
"200"
REDIRECT_HANDLER
"php7.1-fcgi"
REDIRECT_UNIQUE_ID
"W3Skun8AAAEAABBk66cAAAAS"
REDIRECT_REDIRECT_STATUS
"200"
REDIRECT_REDIRECT_UNIQUE_ID
"W3Skun8AAAEAABBk66cAAAAS"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
PHP_AUTH_USER
"ashworth"
PHP_AUTH_PW
"*********"
REQUEST_TIME_FLOAT
1534371002.5102
REQUEST_TIME
1534371002
empty
0. Whoops\Handler\PrettyPageHandler

Online Home Health Aide Training

Our online Home Health Aide training program can be the first step toward a career lending invaluable assistance to people who need it. Our program shows you how to help the elderly or people with disabilities, chronic illness, or cognitive impairment to maintain their quality of life and independence at home. As a graduate of our online Home Health Aide (HHA) program, you’ll possess the professional-level knowledge you need to succeed.

Madison’s comprehensive course was developed by experienced professionals and will help you prepare for career opportunities in home health care by giving you the tools to apply what you learn to real-world situations. With our self-paced, flexible online home health aide training, you can learn when it’s convenient for you. All of your course content is included with your tuition as well as academic support via phone, email or online to help you every step of the way. Enroll and graduate in as few as 4 months and get started towards a rewarding career in an in-demand field.

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: Safety Issues

Safety in the Home Environment

Outdoor safety hazards; assessing environment for safety hazards; avoiding slips, trips, and falls; walking surfaces and stairs.

Bloodborne Pathogens

Universal precaution methods; protective equipment and clothing; types of bloodborne pathogen exposure.

Preventing Violence

Dementia symptoms; aggressive response behavior; behaviors indicating pain; caregiver/patient communication.

Safe Patient Handling

Health care ergonomics; high-risk patient care activities; environmental risks; mechanical aids for lifting/moving patients.

SHOW ALL CURRICULUM

Program Details

Our Home Health Aide training course shows students how to help the elderly, the disabled and people in ill health to maintain their quality of life and independence at home. Students will examine the role and responsibilities of the position and learn to identify and address healthcare concerns for the patients they care for. Graduates gain professional-level knowledge on vital topics including OSHA regulations and safe care requirements, communication, dietary information and exercise as well as recording patient information.

Your Online Home Health Aide Training Course Includes:

  • Comprehensive Home Health Aide training eBook and study guides
  • Career diploma at graduation
  • 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

The online classes inspired me to be able work at my own pace. When I had a question about a subject I was having a hard time with, or needed more instruction on how to do it, they were there to support me every time.

— Debbie Hayden, Recent Graduate

Tuition

Tuition for Madison’s Home Health Aide program is affordable and flexible with convenient payment options. Everything you need to succeed in the program 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

With medical advances extending the lifespan of the population, the need for Home Health Aides to provide these aging baby boomers with the assistance they need to maintain their quality of life continues to grow. According to the U.S. Department of Labor, home health jobs are expected to rise 38% by 2024, much faster than the average among other healthcare-related careers. Skilled Home Health Aides perform a variety of tasks that are important to the daily life of those they care for. For instance, you may do light housekeeping, arrange for transportation, prepare food and provide companionship. Besides private homes, you may find opportunities through healthcare agencies and in retirement and nursing homes, residential facilities for the developmentally challenged and more.

38%
GROWTH
According to the U.S. Department of Labor, home health jobs are expected to reach a staggering 1,261,900 by 2024.

FAQs

Do I need previous experience or a degree prior to enrolling in Madison’s Home Health Aide program?

No, you don’t need previous experience or a degree to enroll in Madison School of Healthcare’s Home Health Aide training program. This course was created by industry experts with first-hand knowledge of the healthcare industry and the responsibilities of the role. These courses will give you the information needed to better prepare for an opportunity as a Home Health Aide.

What features should I look for in the Madison Home Health Aide online program compared to other schools’ programs?

It’s important that the program you choose includes the latest information on home health aide fundamentals. Look for a program that has only the lesson content you need to know; a program that’s focused on the skills you need to start your career. Your program should include lessons on responsibilities involved in caring for home-bound patients, OSHA regulations and other safe care requirements, diet and exercise regimens, and patient care.

Is this program all online or do I get books?

Students will receive a comprehensive Home Health Aide training eBook and online study guides.

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 helping others. Complete your online Home Health Aide training on your own terms. Call 1-800-600-6253 or enroll online today.

Career Outlook Source: Bureau of Labor Statistics, U.S. Department of Labor, Occupational Outlook Handbook, 2016-17 Edition, Home Health Aides (January 13, 2016).