/** * Inits the curl resource * * @return void */ protected function _initCurl() { $this->preCallNotify('_initCurl', array()); $this->_curlResource = curl_init(); $this->_setOption(CURLOPT_RETURNTRANSFER, true); $this->_setOption(CURLOPT_HEADER, true); $this->_setOption(CURLOPT_USERAGENT, 'brawler ' . Brawler_Application::getVersion()); $this->postCallNotify('_initCurl', array(), $this->_curlResource); }
/** * Displays the argument list * * @return void */ public function showArgumentsAction() { $this->setView(new Brawler_View_Grid()); // assemble rows $rows = new ArrayObject(); $arguments = Brawler_Application::getArguments(); $i = $arguments->getIterator(); while ($i->valid()) { $put = array(); if ($i->current()->hasValue()) { $put[] = '-' . $i->current()->getName() . '=<value>'; } else { $put[] = '-' . $i->current()->getName(); } $put[] = $i->current()->getDescription(); $rows->append($put); $i->next(); } $this->getView()->setRows($rows); }
* (at your option) any later version. * * Brawler is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser * General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (c) 2009 Cem Derin, <*****@*****.**> * * @author Cem Derin, <*****@*****.**> * @package Brawler * @copyright 2009 Cem Derin, <*****@*****.**> * @license GNU Lesser General Public License * http://www.gnu.org/licenses/lgpl.html */ // turn on error messages error_reporting(E_ALL | E_STRICT); ini_set('display_errors', 1); // set include path set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__)); // require autoloader require_once 'Brawler/Loader.php'; // register autoloader spl_autoload_register(array('Brawler_Loader', 'load')); // kick application return Brawler_Application::run();