Skip to content

Instantly share code, notes, and snippets.

@dragoonis
Created June 12, 2011 01:48
Show Gist options
  • Select an option

  • Save dragoonis/1021160 to your computer and use it in GitHub Desktop.

Select an option

Save dragoonis/1021160 to your computer and use it in GitHub Desktop.
<?php
class APP_Controller_Panel extends APP_Controller_Application {
protected $_authMethods = array('foo', 'bar', 'required');
}
class APP_Controller_Application extends PPI_Controller {
function __construct() {
if(isset($this->_authMethods)
&& in_array(PPI_Helper::getDispatcher()->getMethodName(), $this->_authMethods)) {
$this->loginCheck();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment