code stringlengths 1 2.01M | language stringclasses 1
value |
|---|---|
<?php
namespace Asar\Resource\Exception;
use \Asar\Resource\Exception;
/**
*/
class ForwardRequest extends Exception {
private $payload = array('request' => null);
function setPayload($payload) {
$this->payload = array_merge($this->payload, $payload);
}
function getPayload() {
return $this->... | PHP |
<?php
namespace Asar\Resource\Exception;
use \Asar\Resource\Exception;
/**
*/
class Redirect extends Exception {
private $payload = array('location' => null);
function setPayload($payload) {
$this->payload = array_merge($this->payload, $payload);
}
function getPayload() {
return $this->paylo... | PHP |
<?php
namespace Asar\Resource\Exception;
use \Asar\Resource\Exception;
/**
*/
class MethodUndefined extends Exception {}
| PHP |
<?php
namespace Asar\Resource\Exception;
use \Asar\Resource\Exception;
/**
*/
class NotFound extends Exception {}
| PHP |
<?php
namespace Asar\Resource;
/**
*/
class Exception extends \Asar\Exception {}
| PHP |
<?php
namespace Asar;
use \Asar\File\Exception\FileAlreadyExists;
use \Asar\File\Exception\DirectoryNotFound;
use \Asar\File\Exception\FileDoesNotExist;
use \Asar\File\Exception as FileException;
/**
* A wrapper class for simplifying file creation and access
*
* EXAMPLE - File Creation
* The following code crea... | PHP |
<?php
namespace Asar;
/**
*/
require_once 'IncludePathManager.php';
class Toolset {
private $include_path_manager;
function getIncludePathManager() {
if (!$this->include_path_manager) {
$this->include_path_manager = new IncludePathManager;
}
return $this->include_path_manager;
}
}
| PHP |
<?php
namespace Asar;
require 'ClassLoader.php';
require 'FileSearcher.php';
require 'FileIncludeManager.php';
require 'EnvironmentHelper/Web.php';
require 'EnvironmentHelper/Bootstrap.php';
class Injector {
private static $cli;
static function injectApplicationRunner(EnvironmentScope $env_scope) {
ret... | PHP |
<?php
namespace Asar;
use \Asar\FileIncludeManager\FileIncludeManagerInterface;
/**
*/
class FileIncludeManager implements FileIncludeManagerInterface {
private $required_once = array();
function requireFileOnce($file) {
// TODO: see if this performs better than require_once();
if (in_array($file, ... | PHP |
<?php
namespace Asar;
/**
*/
class Debug implements \Iterator {
private $data = array(), $valid = FALSE;
function set($key, $value) {
$this->data[$key] = $value;
}
function get($key) {
if (isset($this->data[$key])) {
return $this->data[$key];
}
return null;
}
function re... | PHP |
<?php
namespace Asar\ResourceLister;
/**
*/
interface ResourceListerInterface {
function getResourceListFor($app_name);
}
| PHP |
<?php
namespace Asar;
use \Asar\Resource\ResourceInterface;
use \Asar\Client\Exception\UnknownServerType;
use \Asar\Request;
/**
*/
class Client {
function sendRequest($server, $request) {
if ($server instanceof ResourceInterface) {
return $server->handleRequest($request);
}
throw new UnknownSer... | PHP |
<?php
namespace Asar;
use \Asar\Message;
use \Asar\Response\ResponseInterface;
/**
*/
class Response extends Message implements ResponseInterface {
private $status = 200;
private static $reason_phrases = array(
100 => 'Continue',
101 => 'Switching Protocols',
200 => 'OK',
201 => 'Created',
... | PHP |
<?php
namespace Asar;
use \Asar\Template\TemplateInterface;
/**
*/
class TemplateSimpleRenderer {
function renderTemplate(
$template, $vars,
$layout = null
) {
if (!$template instanceof TemplateInterface) {
return null;
}
$output = $template->render($vars);
if (
!$template-... | PHP |
<?php
namespace Asar\Utility\Cli;
use \Asar\Utility\Cli;
/**
*/
interface CliInterface {
function setController(Cli $controller);
function getTaskNamespace();
}
| PHP |
<?php
namespace Asar\Utility\Cli;
/**
*/
class Command {
private
$caller,
$namespace,
$command,
$flags = array(),
$arguments = array();
function __construct(array $options = array()) {
foreach (
array('caller', 'command', 'namespace', 'flags', 'arguments') as $type
) {
$... | PHP |
<?php
namespace Asar\Utility\Cli;
use \Asar\Utility\Cli;
use \Asar\Utility\Cli\CliInterface;
use \Asar\Utility\ClassFilePeek;
/**
*/
class TaskFileLoader {
private $cwd, $file_peek, $tasks_file, $cli;
function __construct(
$cwd, ClassFilePeek $file_peek, Cli $cli
) {
$this->cwd = $cwd;
$this-... | PHP |
<?php
namespace Asar\Utility\Cli\Exception;
use Asar\Utility\Cli\Exception;
/**
*/
class UndefinedTask extends Exception {}
| PHP |
<?php
namespace Asar\Utility\Cli\Executor;
use \Asar\Utility\Cli\CliInterface;
use \Asar\Utility\Cli\Command;
/**
*/
interface ExecutorInterface {
function registerTasks(CliInterface $tasklist, $namespace = null);
function execute(Command $command);
function getRegisteredTasks();
}
| PHP |
<?php
namespace Asar\Utility\Cli;
use \Asar\Utility\Cli\CliInterface;
use \Asar\Utility\Cli;
/**
*/
class BaseTasks implements CliInterface {
private $controller;
private $asar = null;
function setController(Cli $controller) {
$this->controller = $controller;
}
private function getAsar() {
... | PHP |
<?php
namespace Asar\Utility\Cli;
use \Asar\Utility\Cli\Executor\ExecutorInterface;
use \Asar\Utility\Cli\CliInterface;
use \Asar\Utility\Cli\Command;
use \Asar\Utility\Cli\Exception\UndefinedTask;
use \Asar\Utility\String;
/**
*/
class Executor implements ExecutorInterface {
private $tasklists = array(), $task... | PHP |
<?php
namespace Asar\Utility\Cli;
/**
*/
class Interpreter {
function interpret(array $args) {
$result = array();
$result['caller'] = array_shift($args);
$flags = array();
$arguments = array();
$is_command_found = false;
foreach ($args as $arg) {
if ($is_command_found) {
$argum... | PHP |
<?php
namespace Asar\Utility\Cli;
/**
*/
class Exception extends \Asar\Exception {}
| PHP |
<?php
namespace Asar\Utility\Cli;
use \Asar;
use \Asar\Utility\Cli;
use \Asar\Utility\String;
use \Asar\FileHelper;
use \Asar\FileHelper\Exception\FileAlreadyExists;
use \Asar\FileHelper\Exception\DirectoryAlreadyExists;
/**
*/
class FrameworkTasks implements CliInterface {
private $controller, $file_helper, $... | PHP |
<?php
namespace Asar\Utility;
use \Asar\Utility\Cli\Interpreter;
use \Asar\Utility\Cli\Executor\ExecutorInterface;
use \Asar\Utility\Cli\CliInterface;
/**
*/
class Cli {
private $interpreter, $executor, $cwd;
function __construct(
Interpreter $interpreter, ExecutorInterface $executor, $cwd
) {
$th... | PHP |
<?php
namespace Asar\Utility;
/**
*/
class ClassFilePeek {
function getDefinedClasses($file) {
$php_code = file_get_contents($file);
$classes = $this->get_php_classes($php_code);
return $classes;
}
private function get_php_classes($php_code) {
$classes = array();
$tokens = token_get_all($... | PHP |
<?php
namespace Asar\Utility;
/**
*/
class String {
static function dashCamelCase($string) {
return str_replace(' ', '-', self::ucwordsLower($string));
}
static function dashLowerCase($string) {
return self::uncamelize($string, '-');
}
private static function uncamelize($string, $splitter="_")... | PHP |
<?php
namespace Asar\Application;
use \Asar\Application\Finder\Exception as AppFinderException;
class Finder {
function find($app_name) {
if (
$dir = ($_dir = $this->findDirIfDefined($app_name, 'Application')) ?
$_dir : $this->findDirIfDefined($app_name, 'Config')
) {
return $dir;
... | PHP |
<?php
namespace Asar\Application\Finder;
class Exception extends \Asar\Exception {}
| PHP |
<?php
namespace Asar\HttpServer;
use \Asar\Resource\ResourceInterface;
use \Asar\Request\RequestInterface;
use \Asar\Response;
/**
* A wrapper class for making HTTP Requests
*/
class Fsocket implements ResourceInterface {
private $host;
/**
* @param string $host the web address (e.g. www.google.com)
... | PHP |
<?php
namespace Asar\HttpServer;
/**
*/
class Exception extends \Asar\Exception {}
| PHP |
<?php
namespace Asar;
use \Asar\Resource\ResourceInterface;
use \Asar\Response\ResponseInterface;
use \Asar\Request\RequestInterface;
use \Asar\Config\ConfigInterface;
use \Asar\Config;
use \Asar\PathDiscover\PathDiscoverInterface;
use \Asar\TemplateRenderer;
/**
* @todo remove "as ..."
*/
use \Asar\Templater\Except... | PHP |
<?php
namespace Asar\Templater;
/**
*/
class Exception extends \Asar\Exception {}
| PHP |
<?php
namespace Asar\Template\Exception;
use \Asar\Template\Exception;
/**
*/
class TemplateFileNotFound extends Exception {}
| PHP |
<?php
namespace Asar\Template;
use Asar\Configurable\ConfigurableInterface;
/**
*/
interface TemplateInterface extends ConfigurableInterface {
function setTemplateFile($file);
function getTemplateFile();
function getLayoutVars();
function render($vars=array());
}
| PHP |
<?php
namespace Asar\Template\Engines;
use \Asar\Template\TemplateInterface;
use \Asar\Template\Exception\TemplateFileNotFound;
/**
*/
class PhpEngine implements TemplateInterface {
private
$file,
$layout = array(),
$config = array(
'no_layout' => false
);
function setTemplateFile($... | PHP |
<?php
namespace Asar\Template;
/**
*/
class Exception extends \Asar\Exception {}
| PHP |
<?php
namespace Asar\DebugPrinter;
use Asar\Debug;
/**
* Inserts debug information in a content with a suitable format
*/
interface DebugPrinterInterface {
/**
* Inserts debug information from $debug into $content
*
* @param Asar_Debug $debug
* @param string $content the content where the debug inf... | PHP |
<?php
namespace Asar\DebugPrinter;
use Asar\DebugPrinter\DebugPrinterInterface;
use Asar\Debug;
/**
* A Null DebugPrinter that doesn't do anything but return the content
*/
class NullDebugPrinter implements DebugPrinterInterface {
/**
* Simply returns the passed $content. Nothing more.
*
* @param Asar... | PHP |
<?php
namespace Asar\DebugPrinter;
use Asar\DebugPrinter\DebugPrinterInterface;
use Asar\Debug;
use Asar\Utility\String as StringUtility;
/**
* Debug printer that outputs the debug information in HTML format
*/
class Html implements DebugPrinterInterface {
private $block_elements = array('div', 'table', 'tbody'... | PHP |
<?php
namespace Asar;
use \Asar\Config\ConfigInterface;
/**
*/
class ApplicationScope {
private $app_name, $config, $cache = array();
function __construct($app_name, ConfigInterface $config) {
$this->app_name = $app_name;
$this->config = $config;
}
function getAppName() {
return $this->a... | PHP |
<?php
namespace Asar\ResponseFilter;
use \Asar\Response\ResponseInterface;
/**
*/
interface ResponseFilterInterface {
function filterResponse(ResponseInterface $response);
}
| PHP |
<?php
namespace Asar;
use \Asar\Resource\ResourceInterface;
use \Asar\Router\RouterInterface;
use \Asar\Response\StatusMessages\StatusMessagesInterface;
use \Asar\Response;
use \Asar\Response\ResponseInterface;
use \Asar\Request\RequestInterface;
use \Asar\RequestFilter\RequestFilterInterface;
use \Asar\ResponseFilter... | PHP |
<?php
namespace Asar\Response\StatusMessages;
use \Asar\Response\ResponseInterface;
use \Asar\Request\RequestInterface;
/**
*/
interface StatusMessagesInterface {
function getMessage(
ResponseInterface $response, RequestInterface $request
);
}
| PHP |
<?php
namespace Asar\Response;
use \Asar\Response\StatusMessages\StatusMessagesInterface;
use \Asar\Response\ResponseInterface;
use \Asar\Request\RequestInterface;
/**
*/
class StatusMessages
implements StatusMessagesInterface {
// TODO: These status messages should be moved to the configuration
static pro... | PHP |
<?php
namespace Asar\Response;
use \Asar\Message\MessageInterface;
/**
*/
interface ResponseInterface extends MessageInterface {
function setStatus($status);
function getStatus();
}
| PHP |
<?php
namespace Asar\Logger;
use Asar\Logger\Registry\Exception;
use Asar\Logger\Registry\Exception\UnregisteredNamespace;
use Asar\Logger\DefaultLogger;
use Asar\File;
/**
* Registers loggers that implement the Asar_Logger_Interface
*
* @todo Modify. This looks more like a factory than a logger
*/
class Registry... | PHP |
<?php
namespace Asar\Logger;
/**
* Provides a generic interface for logging
*/
interface LoggerInterface {
/**
* Log a message
* @param string $message the message to be logged
*/
function log($message);
}
| PHP |
<?php
namespace Asar\Logger\Registry\Exception;
use Asar\Logger\Registry\Exception;
/**
*/
class UnregisteredNamespace extends Exception {}
| PHP |
<?php
namespace Asar\Logger\Registry;
/**
*/
class Exception extends \Asar\Exception {}
| PHP |
<?php
namespace Asar\Logger;
use Asar\Logger\LoggerInterface;
use Asar\File;
/**
*/
class DefaultLogger implements LoggerInterface {
private $file;
/**
* @param Asar_File $file an Asar_File object to store the log files in
*/
function __construct(File $file) {
$this->file = $file;
}
/**
... | PHP |
<?php
namespace Asar;
use \Asar\Config\ConfigInterface;
use Asar\Templater;
use Asar\TemplateRenderer;
/**
*/
class ResourceFactory {
function __construct(
TemplatePackageProvider $tl_factory,
TemplateSimpleRenderer $ts_renderer,
ConfigInterface $config
) {
$this->tl_factory = $tl_factory;
... | PHP |
<?php
namespace Asar\Config;
use \Asar\Config;
/**
* Development configuration. Sets some request and response filters useful
* during development. This is set when config 'mode' is set to 'development'.
* See the FDebuggingExample functional test for ideas on usage.
*/
class Development extends Config {
prot... | PHP |
<?php
namespace Asar\Config;
/**
* Default configuration values
*/
class DefaultConfig extends \Asar\Config {
protected $config = array(
'map' => array('/' => 'Index'),
'template_engines' => array('php' => 'Asar\Template\Engines\PhpEngine'),
'use_templates' => true,
'default_clas... | PHP |
<?php
namespace Asar\Config;
/**
*/
class Exception extends \Asar\Exception {}
| PHP |
<?php
namespace Asar\Config;
/**
* Provides a generic interface for configurations
*/
interface ConfigInterface {
/**
* Returns the value of a configuration directive based on a key or
* all the configuration values in a single multi-dimensional array
* when no key is specified.
*
* @param string... | PHP |
<?php
namespace Asar;
use \Asar\ResourceLister\ResourceListerInterface;
use \Asar\Application\Finder as AppFinder;
/**
*/
class ResourceLister implements ResourceListerInterface {
private $app_finder;
function __construct(AppFinder $app_finder) {
$this->app_finder = $app_finder;
}
// TODO: Possib... | PHP |
<?php
namespace Asar\File\Exception;
use \Asar\File\Exception;
/**
*/
class DirectoryNotFound extends Exception {}
| PHP |
<?php
namespace Asar\File\Exception;
use \Asar\File\Exception;
/**
*/
class FileDoesNotExist extends Exception {}
| PHP |
<?php
namespace Asar\File\Exception;
use \Asar\File\Exception;
/**
*/
class FileAlreadyExists extends Exception {}
| PHP |
<?php
namespace Asar\File;
/**
*/
class Exception extends \Asar\Exception {}
| PHP |
<?php
namespace Asar;
use \Asar\Application;
/**
*/
class ApplicationBasic extends Application {}
| PHP |
<?php
namespace Asar\Request;
use \Asar\Message\MessageInterface;
/**
* @todo Move Request to Message namespace
*/
interface RequestInterface extends MessageInterface {
function setParams(array $params);
function getParams();
function setPath($path);
function getPath();
function setMethod($method);
funct... | PHP |
<?php
namespace Asar;
use \Asar\Config\ConfigInterface;
use \Asar\ApplicationScope;
use \Asar\ApplicationInjector;
/**
*/
class ApplicationFactory {
private
$config;
function __construct(ConfigInterface $config) {
$this->config = $config;
}
function getApplication($app_name) {
$app_scop... | PHP |
<?php
namespace Asar;
use \Asar\Config\Exception as ConfigException;
/**
*/
class Config implements Config\ConfigInterface {
protected $config = array();
function __construct($init_config = array()) {
if ($init_config) {
$this->config = $this->configMerge($init_config, $this->config);
}
$... | PHP |
<?php
namespace Asar;
use \Asar\ContentNegotiator\ContentNegotiatorInterface;
/**
* @todo TemplateLocator is tied closely to the default routing algorithm.
* Think about how to decouple them.
*/
class TemplateLocator {
private
$app_path,
$representation_path,
$content_negotiator,
$engine_exte... | PHP |
<?php
namespace Asar;
/**
*/
class IncludePathManager {
function add() {
$paths = func_get_args();
foreach ($paths as $path) {
if (is_array($path)) {
foreach ($path as $p) {
$this->add($p);
}
} else {
$this->realAdd($path);
}
}
}
private func... | PHP |
<?php
namespace Asar;
use \Asar\Resource\ResourceInterface;
use \Asar\Config\ConfigInterface;
use \Asar\Request\RequestInterface;
/**
*/
class Representation implements ResourceInterface, ConfigInterface
{
protected
$resource,
$config = array(),
$methods = array(
'text/html' => 'Html',
... | PHP |
<?php
namespace Asar\ContentNegotiator;
/**
* Provides an interface for content negotiation like how HTTP servers negotiate
* the Content-type and/or language through an HTTP Request accept header.
*/
interface ContentNegotiatorInterface {
/**
* @param string $accept_header the accept header passed by a requ... | PHP |
<?php
namespace Asar\ContentNegotiator;
/**
*/
class Exception extends \Asar\Exception {}
| PHP |
<?php
namespace Asar;
use \Asar\Debug;
/**
*/
class TemplateFactory {
private $engines, $debug;
function __construct(Debug $debug = null) {
$this->debug = $debug;
}
//TODO: This should be moved to constructor
function registerTemplateEngine($extension, $engine) {
$this->engines[$extension]... | PHP |
<?php
namespace Asar;
/**
*/
class ApplicationInjector {
static function injectApplicationRunner(ApplicationScope $scope) {
return new ApplicationRunner(
self::injectApplication($scope)
);
}
static function injectRequest(ApplicationScope $scope) {
return $scope->getRequest();
}
st... | PHP |
<?php
namespace Asar\FileSearcher;
/**
* Provides an interfaces for searching a file given a path
*/
interface FileSearcherInterface {
/**
* @param string $file_path a path to a file that is not usually absolute
* @return string|boolean returns an absolute path to the file or false if it
* ... | PHP |
<?php
namespace Asar;
use \Asar\Request\RequestInterface;
/**
*/
class TemplatePackageProvider {
private $locator, $factory;
function __construct(
TemplateLocator $locator,
TemplateFactory $factory
) {
$this->locator = $locator;
$this->factory = $factory;
}
function getTemplatesFor(... | PHP |
<?php
namespace Asar;
use \Asar\TemplatePackageProvider;
use \Asar\TemplateSimpleRenderer;
use \Asar\Response\ResponseInterface;
use \Asar\Request\RequestInterface;
use \Asar\Template\TemplateInterface;
/**
*/
class TemplateRenderer {
private $package_provider, $renderer;
function __construct(
Template... | PHP |
<?php
namespace Asar;
use \Asar\Config\ConfigInterface;
use \Asar\Debug;
use \Asar\DebugPrinter\Html as HtmlDebugPrinter;
/**
*/
class MessageFilterFactory {
private $config, $debug, $filters = array();
function __construct(ConfigInterface $config, Debug $debug) {
$this->config = $config;
$this->de... | PHP |
<?php
namespace Asar\FileHelper\Exception;
use \Asar\FileHelper\Exception;
/**
*/
class ParentDirectoryDoesNotExist extends Exception {}
| PHP |
<?php
namespace Asar\FileHelper\Exception;
use \Asar\FileHelper\Exception;
/**
*/
class DirectoryAlreadyExists extends Exception {}
| PHP |
<?php
namespace Asar\FileHelper\Exception;
use \Asar\FileHelper\Exception;
/**
*/
class FileAlreadyExists extends Exception {}
| PHP |
<?php
namespace Asar\FileHelper;
/**
*/
class Exception extends \Asar\Exception {}
| PHP |
<?php
/**
*/
class Asar_ApplicationRunner {
private $app;
function __construct(Asar_Application $app) {
$this->app = $app;
}
function run(Asar_Request_Interface $request) {
return $this->app->handleRequest($request);
}
}
| PHP |
<?php
/**
*/
class Asar_Representation_Exception_Unavailable
extends Asar_Representation_Exception {}
| PHP |
<?php
/**
*/
class Asar_Representation_Exception extends Asar_Exception {}
| PHP |
<?php
/**
*/
interface Asar_Representation_Interface {
function fetch($data, $method, array $options = array());
}
| PHP |
<?php
namespace Asar;
use \Asar\Response;
/**
*/
class ResponseExporter {
function exportResponse(Response $response) {
$headers = $response->getHeaders();
foreach ($headers as $key => $value) {
$this->header("$key: $value");
}
$this->header(
"HTTP/1.1 {$response->getStatus()} {$resp... | PHP |
<?php
namespace Asar\RequestFilter;
use \Asar\Request\RequestInterface;
/**
*/
interface RequestFilterInterface {
function filterRequest(RequestInterface $request);
}
| PHP |
<?php
namespace Asar;
/**
*/
class Exception extends \Exception {}
| PHP |
<?php
namespace Asar\ResourceFactory;
class Exception extends \Asar\Exception {}
| PHP |
<?php
namespace Asar\Message;
/**
* A generic message interface that Asar_Request and Asar_Response shares.
*
*/
interface MessageInterface {
function setHeader($name, $value);
function getHeader($name);
function setHeaders(array $headers);
function getHeaders();
function setContent($content);
function g... | PHP |
<?php
namespace Asar;
use \Asar\ContentNegotiator\ContentNegotiatorInterface;
/**
*/
class ContentNegotiator implements ContentNegotiatorInterface {
function negotiateFormat($accept_header, array $available_formats) {
if (empty($available_formats)) {
throw new \Asar\ContentNegotiator\Exception(
... | PHP |
<?php
namespace Asar;
use \Asar\FileSearcher\FileSearcherInterface;
/**
*/
class FileSearcher implements FileSearcherInterface {
function find($file_path) {
if ($this->isAbsolutePath($file_path)) {
if (is_file($file_path)) {
return $file_path;
} else {
return false;
}
}... | PHP |
<?php
namespace Asar;
/**
*/
class EnvironmentScope {
private
$server = array(),
$get = array(),
$post = array(),
$files = array(),
$session = array(),
$cookie = array(),
$env = array(),
$cwd,
$argv = array();
function __construct(
$server, $get, $po... | PHP |
<?php
namespace Asar;
use \Asar\Request;
/**
*/
class RequestFactory {
function createRequest($server = array(), $params = array(), $post = null) {
$options = array();
$options['method'] = $this->getIfExists('REQUEST_METHOD', $server);
$options['path'] = $this->getIfExists('REQUEST_URI', $server);
... | PHP |
<?php
class Asar_Sniffs_WhiteSpace_ScopeClosingBraceSniff
implements PHP_CodeSniffer_Sniff {
/**
* Returns an array of tokens this test wants to listen for.
*
* @return array
*/
public function register() {
return PHP_CodeSniffer_Tokens::$scopeOpeners;
}//end register()
... | PHP |
<?php
require_once 'PHP/CodeSniffer/Standards/PEAR/Sniffs/' .
'Functions/FunctionCallSignatureSniff.php';
class Asar_Sniffs_Functions_FunctionCallSignatureSniff
extends PEAR_Sniffs_Functions_FunctionCallSignatureSniff
{
function processMultiLineCall(
PHP_CodeSniffer_File $phpcsFile, $stackPtr, $openBr... | PHP |
<?php
if (class_exists('PHP_CodeSniffer_Standards_CodingStandard', true) === false) {
throw new PHP_CodeSniffer_Exception(
'Class PHP_CodeSniffer_Standards_CodingStandard not found'
);
}
class PHP_CodeSniffer_Standards_Asar_AsarCodingStandard
extends PHP_CodeSniffer_Standards_CodingStandard
{
function ge... | PHP |
<?php
/**
* This is a modified version of the SplClassLoader. The modification now allows
* for loading single classes (e.g. Pimple.php).
*
* @author Wayne Duran <asartalo@projectweb.ph>
*
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class... | PHP |
<?php
$main_app = 'Sample';
| PHP |
<?php
class Sample_Resource_Index extends Asar_Resource {
function GET() {
return array('h1' => "Hello World!");
}
}
| PHP |
<?php
class Sample_Resource_Redirect extends Asar_Resource {
function GET() {
$this->redirectTo('/');
}
} | PHP |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.