Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tech No Freaky
committed
Oct 16, 2014
0 parents
commit 3ca6db0
Showing
42 changed files
with
3,476 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="chrome=1"> | ||
<title>Eify Page Handler by eMailify</title> | ||
<link rel="stylesheet" href="stylesheets/styles.css"> | ||
<link rel="stylesheet" href="stylesheets/pygment_trac.css"> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | ||
<script src="javascripts/respond.js"></script> | ||
<!--[if lt IE 9]> | ||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | ||
<![endif]--> | ||
<!--[if lt IE 8]> | ||
<link rel="stylesheet" href="stylesheets/ie.css"> | ||
<![endif]--> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> | ||
|
||
</head> | ||
<body> | ||
<div id="header"> | ||
<nav> | ||
<li class="fork"><a href="https://github.com/eMailify/eifyPageHandler">View On GitHub</a></li> | ||
<li class="downloads"><a href="https://github.com/eMailify/eifyPageHandler/zipball/master">ZIP</a></li> | ||
<li class="downloads"><a href="https://github.com/eMailify/eifyPageHandler/tarball/master">TAR</a></li> | ||
<li class="title">DOWNLOADS</li> | ||
</nav> | ||
</div><!-- end header --> | ||
|
||
<div class="wrapper"> | ||
|
||
<section> | ||
<div id="title"> | ||
<h1>Eify Page Handler</h1> | ||
<p>Simple php page handler class</p> | ||
<hr> | ||
<span class="credits left">Project maintained by <a href="https://github.com/eMailify">eMailify</a></span> | ||
<span class="credits right">Hosted on GitHub Pages — Theme by <a href="https://twitter.com/michigangraham">mattgraham</a></span> | ||
</div> | ||
|
||
<hr> | ||
|
||
<h1> | ||
<a name="how-to-use" class="anchor" href="#how-to-use"><span class="octicon octicon-link"></span></a>How to Use?</h1> | ||
|
||
<p>First add the below htaccess in your application</p> | ||
|
||
<pre lang="htaccess"><code><IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
RewriteBase /app_path/ | ||
RewriteRule ^index\.php$ - [L] | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteRule . /app_path/app_main_page.php [L] | ||
</IfModule> | ||
</code></pre> | ||
|
||
<p>Just replace <code>app_path</code> with your app path and <code>app_main_page.php</code> with your app main file</p> | ||
|
||
<p>Simple, Include the class file in your application bootstrap (setup/load/configuration or whatever you call it) Ex:</p> | ||
|
||
<div class="highlight highlight-PHP"><pre><span class="k">include_once</span><span class="p">(</span><span class="s1">'class-eifypagehandler.php'</span><span class="p">);</span> | ||
<span class="nv">$page</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">eifyPageHander</span><span class="p">;</span> | ||
</pre></div> | ||
|
||
<h3> | ||
<a name="to-register-a-new-hander" class="anchor" href="#to-register-a-new-hander"><span class="octicon octicon-link"></span></a>To Register A New Hander</h3> | ||
|
||
<div class="highlight highlight-PHP"><pre> <span class="sd">/**</span> | ||
<span class="sd"> * Register's A Page hander</span> | ||
<span class="sd"> * @param string $handler handler hane</span> | ||
<span class="sd"> * @param string $file file path for the handler</span> | ||
<span class="sd"> * @param string title for the file given</span> | ||
<span class="sd"> * @param boolean login is required for current file</span> | ||
<span class="sd"> * @return boolean</span> | ||
<span class="sd"> */</span> | ||
<span class="nv">$page</span><span class="o">-></span><span class="na">registerHandler</span><span class="p">(</span><span class="s1">'listuer'</span><span class="p">,</span><span class="s1">'list.php'</span><span class="p">,</span><span class="s1">'List Users'</span><span class="p">,</span><span class="k">true</span><span class="p">);</span> | ||
</pre></div> | ||
|
||
<h3> | ||
<a name="to-remove-a-existing-handler" class="anchor" href="#to-remove-a-existing-handler"><span class="octicon octicon-link"></span></a>To Remove A Existing Handler</h3> | ||
|
||
<div class="highlight highlight-PHP"><pre> <span class="sd">/**</span> | ||
<span class="sd"> * Removes a page handler</span> | ||
<span class="sd"> * @param string $handler handler name to remove</span> | ||
<span class="sd"> * @return boolean</span> | ||
<span class="sd"> */</span> | ||
<span class="nv">$page</span><span class="o">-></span><span class="na">deregisterHandler</span><span class="p">(</span><span class="s1">'user'</span><span class="p">);</span> | ||
</pre></div> | ||
|
||
<h3> | ||
<a name="get-page-name-for-a-handler" class="anchor" href="#get-page-name-for-a-handler"><span class="octicon octicon-link"></span></a>Get Page Name for a Handler</h3> | ||
|
||
<div class="highlight highlight-PHP"><pre> <span class="sd">/**</span> | ||
<span class="sd"> * Returns the file path for the given handler</span> | ||
<span class="sd"> * @param string $handler</span> | ||
<span class="sd"> * @return boolean</span> | ||
<span class="sd"> */</span> | ||
<span class="nv">$page</span><span class="o">-></span><span class="na">getHandler</span><span class="p">(</span><span class="s1">'user'</span><span class="p">)</span> | ||
</pre></div> | ||
|
||
<h3> | ||
<a name="get-page-name-for-a-handler-1" class="anchor" href="#get-page-name-for-a-handler-1"><span class="octicon octicon-link"></span></a>Get Page Name for a Handler:</h3> | ||
|
||
<div class="highlight highlight-PHP"><pre> <span class="sd">/**</span> | ||
<span class="sd"> * Returns Current Requested Page</span> | ||
<span class="sd"> * @return Handler Name [string]</span> | ||
<span class="sd"> */</span> | ||
<span class="nv">$page</span><span class="o">-></span><span class="na">requestHander</span><span class="p">()</span> | ||
</pre></div> | ||
|
||
<h3> | ||
<a name="get-current-page-title" class="anchor" href="#get-current-page-title"><span class="octicon octicon-link"></span></a>Get Current Page Title</h3> | ||
|
||
<div class="highlight highlight-php"><pre><span class="k">echo</span> <span class="nv">$page</span><span class="o">-></span><span class="na">currentTitle</span><span class="p">()</span> <span class="p">;</span> | ||
</pre></div> | ||
|
||
<h3> | ||
<a name="get-current-file" class="anchor" href="#get-current-file"><span class="octicon octicon-link"></span></a>Get Current File</h3> | ||
|
||
<div class="highlight highlight-php"><pre><span class="k">echo</span> <span class="nv">$page</span><span class="o">-></span><span class="na">currentPage</span><span class="p">();</span> | ||
</pre></div> | ||
|
||
<h3> | ||
<a name="get-current-handler-name" class="anchor" href="#get-current-handler-name"><span class="octicon octicon-link"></span></a>Get Current Handler Name</h3> | ||
|
||
<div class="highlight highlight-php"><pre><span class="k">echo</span> <span class="nv">$page</span><span class="o">-></span><span class="na">currentHandler</span><span class="p">();</span> | ||
</pre></div> | ||
</section> | ||
|
||
</div> | ||
<!--[if !IE]><script>fixScale(document);</script><![endif]--> | ||
<script type="text/javascript"> | ||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | ||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | ||
</script> | ||
<script type="text/javascript"> | ||
try { | ||
var pageTracker = _gat._getTracker("UA-55772181-2"); | ||
pageTracker._trackPageview(); | ||
} catch(err) {} | ||
</script> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.