code/class/Objects/IView.php: * An un-opinionated View interface, used by the View component
code/class/Objects/Request.php: * - url
code/class/Objects/Request.php: * - queryString
code/class/Objects/Request.php: * - query paramaters
code/class/Objects/Request.php: * - post paramaters
code/class/Objects/Request.php: * - POST vs GET vs PUT vs whatever
code/class/Objects/Request.php: * - headers
code/class/Objects/Request.php: * - cookies
code/class/Objects/Request.php: $this->url = parse_url($url, PHP_URL_PATH);
code/class/Objects/Request.php: $this->data = $_GET;
code/class/Objects/Request.php: $this->data = $_POST;
code/class/Objects/Request.php: $this->method = strtoupper($method);
code/class/Objects/Request.php: return $this->url;
code/class/Objects/Request.php: return $this->method;
code/class/Objects/Request.php: return $this->data;
code/class/Objects/Response.php: * Whether to send content or not. Mark false if you're sending headers to load-from-cache
code/class/Objects/Response.php: $this->request = $request;
code/class/Objects/Response.php: $this->headers[] = $header;
code/class/Objects/Response.php: $this->headers = array_merge($this->headers, $headers);
code/class/Objects/Response.php: foreach ($this->headers as $headerArgsArray){
code/class/Objects/Route.php: * Ex: `/blog/{slug}/` requested by `/blog/happy-cats/` would yield `['slug'=>'happy-cats']`
code/class/Objects/Route.php: * A simplified pattern for the route-selection algorithm
code/class/Objects/Route.php: $this->$name = $d;
code/class/Objects/Route.php: if (!isset($this->paramaters[$op]))$this->paramaters[$op] = null;
code/class/Objects/Route.php: return explode('/',$this->url)[1+$index] ?? null;
code/class/Objects/Route.php: return $this->paramaters[$key] ?? null;
code/class/Objects/Route.php: * Get a named url paramater by index (zero-based)
code/class/Objects/Route.php: return array_values($this->paramaters)[$index] ?? null;
code/class/Objects/Route.php: return $this->package;
code/class/Objects/Route.php: return $this->url;
code/class/Objects/Route.php: return $this->method;
code/class/Objects/Route.php: return $this->target;
code/class/Objects/Route.php: $t = $this->target;
code/class/Objects/Route.php: if ($this->isFile())return 'file';
code/class/Objects/Route.php: else if ($this->isCallable())return 'callable';
code/class/Objects/Route.php: $t = $this->target;
code/class/Objects/Route.php: $t = $this->target;
code/class/Objects/Route.php: if (!$this->isFile())return false;
code/class/Objects/Route.php: $ext = pathinfo($this->target, PATHINFO_EXTENSION);
code/class/Objects/Route.php: return $this->paramaterizedPattern;
code/class/Objects/Route.php: return $this->placeholderPattern;
code/class/Objects/Route.php: return $this->allowedMethods;
code/class/Objects/Route.php: return count($this->paramaters);
code/class/Objects/Route.php: return array_keys($this->paramaters);
code/class/Objects/Route.php: return $this->paramaters;
code/class/Objects/Route.php: return ($this->paramaterCount()===0);
code/class/Objects/Route.php: return !$this->isStatic();
code/class/Objects/View.php: * A View, which passes properties to a template file and loads associated resources (.css/.js files). You must invoke `__toString()` (`''.$view`) or `$view->content()` or `$view->resources()` or nothing happens.
code/class/Objects/View.php: * @todo Add automatic routing via the view system (which is more robust and neat than simple public-files), such as with a `public-view` dir
code/class/Objects/View.php: * @todo a `<lia-route pattern="/"> might be a valid option, but that seems more like an extension feature than a core feature
code/class/Objects/View.php: * @todo Add events for before-view & after-view
code/class/Objects/View.php: $this->name = $name;
code/class/Objects/View.php: $this->dir = $dir;
code/class/Objects/View.php: $this->args = $allArgs;
code/class/Objects/View.php: $this->lia = $this->args['lia'];
code/class/Objects/View.php: if ($this->resources!==null)return $this->resources;
code/class/Objects/View.php: $lia = $this->lia;
code/class/Objects/View.php: $dir = $this->dir.'/'.$this->name;
code/class/Objects/View.php: $lia->addResourceFile($dir.$jsFile);
code/class/Objects/View.php: $lia->addResourceFile($dir.$cssFile);
code/class/Objects/View.php: $this->resources = $resources;
code/class/Objects/View.php: if ($this->content!==null)return $this->content;
code/class/Objects/View.php: $this->resources();
code/class/Objects/View.php: extract($this->args);
code/class/Objects/View.php: $allArgs = $this->args;
code/class/Objects/View.php: require($this->dir.'/'.$this->name.'.php');
code/class/Objects/View.php: $this->content = $content;
code/class/Objects/View.php: return $this->content();
code/class/Objects/ViewCallable.php: $this->viewData = $viewData;
code/class/Objects/ViewCallable.php: $vd = $this->viewData;
code/class/Other/ScannerTrait.php: $lia = $this->lia;
code/class/Other/ScannerTrait.php: $prefixes = $lia->getApiPrefixes();
code/class/Other/ScannerTrait.php: $prefixes = $this->getPrefixes();
code/class/Other/ScannerTrait.php: $this->lia->api($api, $cleanName, [$this, $methodName]);
code/class/Utility/ClassFinder.php: return $ref->getInterfaceNames();
code/class/Utility/Files.php: &&substr($path,-strlen($endingWith))!=$endingWith)continue;
code/class/Utility/StaticFile.php: /** headers for the cache-state */
code/class/Utility/StaticFile.php: $this->file = $file;
code/class/Utility/StaticFile.php: $this->type = $type ?? pathinfo($file, PATHINFO_EXTENSION);
code/class/Utility/StaticFile.php: $this->getHeaders();
code/class/Utility/StaticFile.php: if ($this->typeHeaders!=null){
code/class/Utility/StaticFile.php: return $this->typeHeaders;
code/class/Utility/StaticFile.php: $filePath = $this->file;
code/class/Utility/StaticFile.php: $type = $this->getFileMimeType($filePath.'.'.$this->type);
code/class/Utility/StaticFile.php: $headers[] = ['Content-type: '.$type];
code/class/Utility/StaticFile.php: $headers[] = ['Content-Length: '.filesize($filePath)];
code/class/Utility/StaticFile.php: $this->typeHeaders = $headers;
code/class/Utility/StaticFile.php: * @return array of headers for cache-control
code/class/Utility/StaticFile.php: if ($this->cacheHeaders!=null){
code/class/Utility/StaticFile.php: return $this->cacheHeaders;
code/class/Utility/StaticFile.php: $filePath = $this->file;
code/class/Utility/StaticFile.php: $type = $this->getFileMimeType($filePath.'.'.$this->type);
code/class/Utility/StaticFile.php: if (isset($headers['If-Modified-Since'])
code/class/Utility/StaticFile.php: && (strtotime($headers['If-Modified-Since']) == $mtime)
code/class/Utility/StaticFile.php: $headers[] = ['Last-Modified: '.gmdate('D, d M Y H:i:s', $mtime).' GMT', true, 304];
code/class/Utility/StaticFile.php: $this->userHasFileCached = true;
code/class/Utility/StaticFile.php: $headers[] = ['Last-Modified: '.gmdate('D, d M Y H:i:s', $mtime).' GMT', true, 200];
code/class/Utility/StaticFile.php: $headers[] = ['Content-Length: '.filesize($filePath)];
code/class/Utility/StaticFile.php: $headers[] = ['Cache-Control: max-age='.(60*60*24*30)];
code/class/Utility/StaticFile.php: $this->cacheHeaders = $headers;
code/class/Utility/StaticFile.php: if ($this->headers!=null){
code/class/Utility/StaticFile.php: return $this->headers;
code/class/Utility/StaticFile.php: $filePath = $this->file;
code/class/Utility/StaticFile.php: $type = $this->getFileMimeType($filePath.'.'.$this->type);
code/class/Utility/StaticFile.php: if (isset($headers['If-Modified-Since'])
code/class/Utility/StaticFile.php: && (strtotime($headers['If-Modified-Since']) == $mtime)
code/class/Utility/StaticFile.php: $headers[] = ['Last-Modified: '.gmdate('D, d M Y H:i:s', $mtime).' GMT', true, 304];
code/class/Utility/StaticFile.php: $headers[] = ['Content-type: '.$type];
code/class/Utility/StaticFile.php: $this->userHasFileCached = true;
code/class/Utility/StaticFile.php: $headers[] = ['Last-Modified: '.gmdate('D, d M Y H:i:s', $mtime).' GMT', true, 200];
code/class/Utility/StaticFile.php: $headers[] = ['Content-type: '.$type];
code/class/Utility/StaticFile.php: $headers[] = ['Content-Length: '.filesize($filePath)];
code/class/Utility/StaticFile.php: $headers[] = ['Cache-Control: max-age='.(60*60*24*30)];
code/class/Utility/StaticFile.php: $this->headers = $headers;
code/class/ExceptionCatcher.php: $trace = $e->getTrace();
code/class/ExceptionCatcher.php: $msg = $e->getMessage();
code/class/ExceptionCatcher.php: $msg = $e->getMessage();
code/class/ExceptionCatcher.php: $msg = $e->getMessage();
code/class/ExceptionCatcher.php: $msg = $e->getMessage();
code/class/ExceptionCatcher.php: $msg = $e->getMessage();
code/class/ExceptionCatcher.php: $trace = $e->getTrace();
code/class/ExceptionCatcher.php: echo "\n\n---begin stacktrace---\n";
code/class/ExceptionCatcher.php: ."\n - File: ".$trace_entry['file']
code/class/ExceptionCatcher.php: ."\n - Line: ".$trace_entry['line']
code/class/ExceptionCatcher.php: ."\n - Function: ".$trace_entry['function']
code/class/ExceptionCatcher.php: return '--dir-not-implemented-yet--';
code/class/ExceptionCatcher.php: // if ($this->trace!=null)return $this->trace;
code/class/ExceptionCatcher.php: $list = $exception->getTrace();
code/class/ExceptionCatcher.php: foreach ($list as $depth => $trace){ #2 [internal function]: Lia\Route\Router->global_contentFor()
code/class/ExceptionCatcher.php: $trace['line'] = $trace['line'] ?? '--n/a--';
code/class/ExceptionCatcher.php: $file = $trace['file'] ?? '--n/a--';
code/class/ExceptionCatcher.php: if ($file=='--n/a--'){
code/class/ExceptionCatcher.php: $trace->calledClass = $trace->class;
code/class/ExceptionCatcher.php: unset($trace->class);
code/class/ExceptionCatcher.php: $trace->calledFunction = $trace->function;
code/class/ExceptionCatcher.php: if ($trace->function=='__call'){
code/class/ExceptionCatcher.php: unset($trace->function);
code/class/ExceptionCatcher.php: $trace->fromClass = $next['class'] ?? '--n/a--';
code/class/ExceptionCatcher.php: $trace->fromFunction = $next['function'] ?? '--n/a--';
code/class/ExceptionCatcher.php: $trace->message = $exception->getMessage();
code/class/OldPackage.php: * - Configs are loaded from a config file in the package. Any keys set in the $config array will replace values set in the config file
code/class/OldPackage.php: * - Setup is only performed if dir is non-null
code/class/OldPackage.php: * @param array $configs Configs to set. Pass ['name'=>'SomeName'], to later use `$lia->package('SomeName')` to retrieve it
code/class/OldPackage.php: * @note removed type from first param to support incremental backward-compatible changes
code/class/OldPackage.php: $this->dir = $dir;
code/class/OldPackage.php: $this->lia = $lia;
code/class/OldPackage.php: $this->setup($configs, $dir);
code/class/OldPackage.php: if ($dir!==null)$this->dir = $dir;
code/class/OldPackage.php: if (!is_dir($this->dir)){
code/class/OldPackage.php: throw new \Lia\Exception("Package dir must be set via `new ${class}(\$lia, \$dir)` or ${class}->setup(\$configs, \$dir) call. '$dir' is not valid");
code/class/OldPackage.php: $lia = $this->lia;
code/class/OldPackage.php: $this->setup_config_file($this->dir.'/config.json');
code/class/OldPackage.php: $this->config = array_replace_recursive($this->config, $configs);
code/class/OldPackage.php: $this->setup_components($this->dir('component'));
code/class/OldPackage.php: $this->lifecycle('onComponentsLoaded');
code/class/OldPackage.php: $this->setup_autoload($this->dir('autoload'));
code/class/OldPackage.php: $this->setup_views(realpath($this->dir('view')),
code/class/OldPackage.php: $this->setup_public_routes($this->dir('public'));
code/class/OldPackage.php: $this->lifecycle('onPrePackageReady');
code/class/OldPackage.php: $this->lifecycle('onPackageReady');
code/class/OldPackage.php: $name = $this->config['name'] ?? uniqid();
code/class/OldPackage.php: if ($this->get('namespace')==null)$this->set('namespace',$name);
code/class/OldPackage.php: $this->name = $name;
code/class/OldPackage.php: if ($lia->hasApi('lia:package.add')){
code/class/OldPackage.php: $lia->api('lia:package.add', $this, $this->get('namespace'));
code/class/OldPackage.php: * Execute same-named php file in the package's `package_lifecycle` dir
code/class/OldPackage.php: if ($this->lifecycleCompos==null){
code/class/OldPackage.php: foreach ($this->compos as $c){
code/class/OldPackage.php: $this->lifecycleCompos[] = $c;
code/class/OldPackage.php: $this->$name();
code/class/OldPackage.php: foreach ($this->lifecycleCompos as $compo){
code/class/OldPackage.php: $compo->$name();
code/class/OldPackage.php: if (is_dir($hookDir=$this->dir('package_lifecycle'))){
code/class/OldPackage.php: $this->compos[$name] = $component;
code/class/OldPackage.php: * Load Config file. Currently `$package->dir.'/config.json'`.
code/class/OldPackage.php: $merged = array_replace_recursive($this->config,$configs);
code/class/OldPackage.php: $this->config = $merged;
code/class/OldPackage.php: $hidden = $this->config['route']['hidden_extensions'];
code/class/OldPackage.php: $pattern = substr($pattern,0,-(strlen($ext)+1));
code/class/OldPackage.php: $indexNames = $this->config['route']['index_names'];
code/class/OldPackage.php: $pattern = substr($pattern,0,-strlen($base));
code/class/OldPackage.php: &&$this->config['route']['force_trail_slash'])$pattern .= '/';
code/class/OldPackage.php: $this->config = array_replace_recursive($this->config, $array);
code/class/OldPackage.php: return \Liaison\Utility\DotNotation::getNestedValue($key, $this->config);
code/class/OldPackage.php: return $this->config['class'][$forKey];
code/class/OldPackage.php: $compo = $this->compos[$name] ?? null;
code/class/OldPackage.php: $packageName = $this->get('name') ?? '--unnamed-package--';
code/class/OldPackage.php: if ($forKey==null)return $this->dir;
code/class/OldPackage.php: $dir = $this->config['dir'][$forKey] ?? null;
code/class/OldPackage.php: return $this->dir.'/'.$dir;
code/class/OldPackage.php: $base = $this->get('dir.public.baseUrl');
code/class/OldPackage.php: if ($this->lia->hasApi('lia:autoload.addDir'))
code/class/OldPackage.php: $this->lia->api('lia:autoload.addDir', $dir);
code/class/OldPackage.php: $prefix = $prefix ?? $this->config['dir']['public']['baseUrl'];
code/class/OldPackage.php: $lia = $this->lia;
code/class/OldPackage.php: $pattern = $this->fileToPattern($relFile);
code/class/OldPackage.php: $pattern=$this->lia->clean_url($pattern);
code/class/OldPackage.php: $lia->api('lia:route.add', $pattern, $path, $this);
code/class/OldPackage.php: $lia = $this->lia;
code/class/OldPackage.php: $hasConfigApi = $lia->hasApi('lia:config.get');
code/class/OldPackage.php: $oldConflictMode = $hasConfigApi ? $lia->api('lia:config.get', 'lia:view.conflictMode') : null;
code/class/OldPackage.php: $conflictMode = $this->config['views']['conflict'] ?? $oldConflictMode ?? 'throw';
code/class/OldPackage.php: if ($hasConfigApi)$lia->api('lia:view.setConflictMode', $conflictMode);
code/class/OldPackage.php: $viewName = substr($f,1,-4);
code/class/OldPackage.php: $viewName = $this->get('namespace').':'.$viewName;
code/class/OldPackage.php: $class = $this->class('view');
code/class/OldPackage.php: if ($hasConfigApi&&$viewName=='theme')$lia->api('lia:view.setConflictMode', 'overwrite');
code/class/OldPackage.php: $lia->api('lia:view.add', $class, $dir, $viewName, $args);
code/class/OldPackage.php: if ($hasConfigApi&&$viewName=='theme')$lia->api('lia:view.setConflictMode', $conflictMode);
code/class/OldPackage.php: $mth = array_map(function($v){if (!is_string($v)&&!is_null($v))return 'not-string';}, $lia->methods);
code/class/OldPackage.php: // $mth = $lia->methods;
code/class/OldPackage.php: $lia->api('lia:view.setConflictMode', $oldConflictMode);
code/class/Addon.php: // $this->onWillCreate();
code/class/Addon.php: } else if (isset($liaison->lia)&&get_class($liaison)!=\Lia::class){
code/class/Addon.php: $liaison = $liaison->lia;
code/class/Addon.php: $this->lia = $liaison;
code/class/Addon.php: $this->_lia = $liaison;
code/class/Addon.php: $this->name = $name ?? $this->name;
code/class/Addon.php: if ($this->name == null){
code/class/Addon.php: $this->name = substr($addon_name, strrpos($addon_name, '\\')+1);
code/class/Addon.php: $liaison->addons[$this->name] = $this;
code/class/Addon.php: $liaison->fqn_addons[$this->fqn] = $this;
code/class/Addon.php: // var_dump($this->lia);
code/class/Addon.php: return $this->lia->methods[$method](...$args);
code/class/Router/FastFileRouter.php: $url = substr($_SERVER['REQUEST_URI'],0,strpos($_SERVER['REQUEST_URI'], '?')-1);
code/class/Router/FastFileRouter.php: if (strtolower(substr($file,-4))=='.php')return;
code/class/Router/FastFileRouter.php: if (isset($request_headers['If-Modified-Since'])
code/class/Router/FastFileRouter.php: && (strtotime($request_headers['If-Modified-Since']) == $mtime)
code/class/Router/FastFileRouter.php: header('Last-Modified: '.gmdate('D, d M Y H:i:s', $mtime).' GMT', true, 304);
code/class/Router/FastFileRouter.php: header('Content-type: '.$type);
code/class/Router/FastFileRouter.php: header('Last-Modified: '.gmdate('D, d M Y H:i:s', $mtime).' GMT', true, 200);
code/class/Router/FastFileRouter.php: header('Content-type: '.$type);
code/class/Router/FastFileRouter.php: header('Content-Length: '.filesize($file_path));
code/class/Router/FastFileRouter.php: header('Cache-Control: max-age='.(60*60*24*30));
code/class/Lia.php: * Array where `key` is the prefix and `value` is a callable that is executed when a prefixed-method is found
code/class/Lia.php: $this->lia = $liaison;
code/class/Lia.php: $this->_lia = $this;
code/class/Lia.php: $this->copy($liaison);
code/class/Lia.php: $this->props = &$lia->props;
code/class/Lia.php: $this->addons = &$lia->addons;
code/class/Lia.php: $this->methods = &$lia->methods;
code/class/Lia.php: $this->prefixes = &$lia->prefixes;
code/class/Lia.php: $this->fqn_addons = &$lia->fqn_addons;
code/class/Lia.php: $this->_lia = $lia->_lia ?? $lia ?? $this;
code/class/Lia.php: $this->lia = $lia;
code/class/Lia.php: if (!isset($this->prefixes[$prefix])){
code/class/Lia.php: // foreach ($this->prefixes as $prefix=>$handler){
code/class/Lia.php: $handler = $this->prefixes[$prefix];
code/class/Lia.php: $conf = &$this->props;
code/class/Lia.php: $conf = &$this->props;
code/class/Lia.php: $conf = $this->props;
code/class/Lia.php: $conf = &$this->props;
code/class/Lia.php: $this->addons[$name] = $addon;
code/class/Lia.php: $methods = &$this->methods;
code/class/Lia.php: // return $this->_lia->api($name,...$args);
code/class/Lia.php: // $methods = &$this->methods;
code/class/Lia.php: $this->prefixes[$prefix] = $method;
code/class/Lia.php: * Get an addon by it's fully-qualified-name
code/class/Lia.php: return $this->fqn_addons[$fqn];
code/class/Lia.php: return $this->methods[$method](...$args);
code/class/Lia.php: $a = $this->addons[$addon];
code/class/Lia.php: $this->addons[$name] = $addon;
code/class/Lia.php:echo "\n\n\n-----------\nAddons:\n";
code/class/Lia.php: $fqn_addons = array_map($c,$this->fqn_addons);
code/class/Lia.php:echo "\n\n\n-----------\nMethods:\n";
code/class/Lia.php: $methods = array_map($c, $this->methods);
code/class/Lia.php:echo "\n\n\n-----------\nProps:\n";
code/class/Lia.php: $props = array_map($c, $this->props);
code/class/Lia.php:echo "\n\n\n-----------\nPrefixes:\n";
code/class/Lia.php: $prefixes = array_map($c, $this->prefixes);
code/class/Lia.php:echo "\n\n\n-----------\nAddon Tree:\n";
code/class/Lia.php: $addons = array_map($c, $this->addons);
code/class/Lia.php: &&is_object($value[0]))return get_class($value[0]).'#'.spl_object_id($value[0]).'->'.$value[1];
code/class/Package.php: $this->_lia = $liaison->_lia ?? $liaison->lia ?? $liaison ?? $this;
code/class/Package.php: $this->name = $name ?? $this->name;
code/class/Package.php: $this->copy($liaison);
code/class/Package.php: $this->props[$name] = $this->props[$name] ?? [];
code/class/Package.php: $this->props = &$this->props[$name];
code/class/Package.php: $this->dir = $dir ?? $this->props['dir'] ?? null;
code/class/Package.php: $this->props['dir'] = &$this->dir;
code/class/Package.php: $this->addons = &$this->addons[$this->name];
code/class/Package.php: $this->addons = $this->addons ?? [];
code/class/Package.php: $this->addons['package'] = $this;
code/class/Package.php: $this->methods = &$this->methods;
code/class/Package.php: $this->_lia->packages[$this->name] = $this;
code/class/Package.php: // instead ->methods is a direct copy of root methods
code/class/Package.php: // $this->methods[$name] = [];
code/class/Package.php: // $this->methods = &$this->methods[$name];
code/class/Package.php: $dir = $this->dir.'/'.$sub_dir;
code/class/Package.php: foreach ($this->addons as $a){
code/class/Package.php: $a->onPackageReady($this);
code/class/Package.php: return $this->dir.'/'.$sub_dir.'/';
code/class/Server.php: * Instead do `$lia->set('package_name.base_url', '/base_url/');`
code/class/Server.php: $this->base_url.$path
code/class/Server.php: if (!isset($lia->props['server']['cache']['dir'])){
code/class/Server.php: $lia->props['server']['cache']['dir'] = $this->dir('cache');
code/class/Server.php: $this->props[$p] = $this->props[$p] ?? $value;
code/class/Server.php: $this->props['base_url'] = $this->props['base_url'] ?? $this->base_url;
code/class/Server.php: $this->base_url = &$this->props['base_url'];
code/class/Server.php: $this->dir = $this->dir ?? dirname(__DIR__);
code/class/Server.php: $this->load_addons('addon');
code/class/Server.php: $public_dir = $this->dir.'/public/';
code/class/Server.php: $patterns = $this->fqn_addons['lia:server.router']
code/class/Server.php: ->dir_to_patterns($public_dir);
code/class/Server.php: $lia->addRoute($this->base_url.$pattern,$public_dir.'/'.$file, $this);
code/class/Server.php: $view_dir = $this->dir.'/view/';
code/class/Server.php: $this->fqn_addons['lia:server.view']->addDir($view_dir, $this);
code/class/Server.php: $this->fqn_addons[$this->fqn.'.package'] = $this;
code/class/Server.php: $this->ready();
code/class/Server.php: $patterns = $this->fqn_addons['lia:server.router']
code/class/Server.php: ->dir_to_patterns($dir);
code/class/Server.php: $lia->addRoute($prefix.$pattern,$public_dir.'/'.$file, $this);
code/class/Server.php: $url = $this->base_url.'/'.$url;
code/class/Server.php: $this->lia->goto($url);
code/class/Server.php: // $this->lia->dump();
code/file/http_status_codes.php: * pinned online at https://wtools.io/paste-code/b4b1
code/file/http_status_codes.php: * Scraped from https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
code/file/http_status_codes.php: 203 => 'Non-Authoritative Information',
code/file/http_status_codes.php: 207 => 'Multi-Status',
code/file/mime_type_map.php: 0 => 'application/font-woff',
code/file/mime_type_map.php: 1 => 'application/x-httpd-php',
code/file/mime_type_map.php: 2 => 'application/x-httpd-php-source',
code/file/mime_type_map.php: 3 => 'application/x-php',
code/file/mime_type_map.php: 5 => 'text/x-php',
code/file/mime_type_map.php: 0 => 'application/x-font-otf',
code/file/mime_type_map.php: 0 => 'application/x-font-ttf',
code/file/mime_type_map.php: 0 => 'application/x-font-ttf',
code/file/mime_type_map.php: 0 => 'application/x-gzip',
code/file/mime_type_map.php: 0 => 'image/x-ms-bmp',
code/file/mime_type_map.php: 0 => 'application/andrew-inset',
code/file/mime_type_map.php: 0 => 'application/cdmi-capability',
code/file/mime_type_map.php: 0 => 'application/cdmi-container',
code/file/mime_type_map.php: 0 => 'application/cdmi-domain',
code/file/mime_type_map.php: 0 => 'application/cdmi-object',
code/file/mime_type_map.php: 0 => 'application/cdmi-queue',
code/file/mime_type_map.php: 0 => 'application/cu-seeme',
code/file/mime_type_map.php: 0 => 'application/font-tdpfr',
code/file/mime_type_map.php: 0 => 'application/java-archive',
code/file/mime_type_map.php: 0 => 'application/java-serialized-object',
code/file/mime_type_map.php: 0 => 'application/java-vm',
code/file/mime_type_map.php: 0 => 'application/mac-binhex40',
code/file/mime_type_map.php: 0 => 'application/mac-compactpro',
code/file/mime_type_map.php: 0 => 'application/octet-stream',
code/file/mime_type_map.php: 0 => 'application/octet-stream',
code/file/mime_type_map.php: 0 => 'application/octet-stream',
code/file/mime_type_map.php: 0 => 'application/octet-stream',
code/file/mime_type_map.php: 0 => 'application/octet-stream',
code/file/mime_type_map.php: 0 => 'application/octet-stream',
code/file/mime_type_map.php: 0 => 'application/octet-stream',
code/file/mime_type_map.php: 0 => 'application/octet-stream',
code/file/mime_type_map.php: 0 => 'application/octet-stream',
code/file/mime_type_map.php: 0 => 'application/octet-stream',
code/file/mime_type_map.php: 0 => 'application/octet-stream',
code/file/mime_type_map.php: 0 => 'application/octet-stream',
code/file/mime_type_map.php: 0 => 'application/oebps-package+xml',
code/file/mime_type_map.php: 0 => 'application/patch-ops-error+xml',
code/file/mime_type_map.php: 0 => 'application/pgp-encrypted',
code/file/mime_type_map.php: 0 => 'application/pgp-signature',
code/file/mime_type_map.php: 0 => 'application/pgp-signature',
code/file/mime_type_map.php: 0 => 'application/pics-rules',
code/file/mime_type_map.php: 0 => 'application/pkcs7-mime',
code/file/mime_type_map.php: 0 => 'application/pkcs7-mime',
code/file/mime_type_map.php: 0 => 'application/pkcs7-signature',
code/file/mime_type_map.php: 0 => 'application/pkix-attr-cert',
code/file/mime_type_map.php: 0 => 'application/pkix-cert',
code/file/mime_type_map.php: 0 => 'application/pkix-crl',
code/file/mime_type_map.php: 0 => 'application/pkix-pkipath',
code/file/mime_type_map.php: 0 => 'application/relax-ng-compact-syntax',
code/file/mime_type_map.php: 0 => 'application/resource-lists+xml',
code/file/mime_type_map.php: 0 => 'application/resource-lists-diff+xml',
code/file/mime_type_map.php: 0 => 'application/rls-services+xml',
code/file/mime_type_map.php: 0 => 'application/rpki-ghostbusters',
code/file/mime_type_map.php: 0 => 'application/rpki-manifest',
code/file/mime_type_map.php: 0 => 'application/rpki-roa',
code/file/mime_type_map.php: 0 => 'application/scvp-cv-request',
code/file/mime_type_map.php: 0 => 'application/scvp-cv-response',
code/file/mime_type_map.php: 0 => 'application/scvp-vp-request',
code/file/mime_type_map.php: 0 => 'application/scvp-vp-response',
code/file/mime_type_map.php: 0 => 'application/set-payment-initiation',
code/file/mime_type_map.php: 0 => 'application/set-registration-initiation',
code/file/mime_type_map.php: 0 => 'application/sparql-query',
code/file/mime_type_map.php: 0 => 'application/sparql-results+xml',
code/file/mime_type_map.php: 0 => 'application/timestamped-data',
code/file/mime_type_map.php: 0 => 'application/vnd.3gpp.pic-bw-large',
code/file/mime_type_map.php: 0 => 'application/vnd.3gpp.pic-bw-small',
code/file/mime_type_map.php: 0 => 'application/vnd.3gpp.pic-bw-var',
code/file/mime_type_map.php: 0 => 'application/vnd.3m.post-it-notes',
code/file/mime_type_map.php: 0 => 'application/vnd.adobe.air-application-installer-package+zip',
code/file/mime_type_map.php: 0 => 'application/vnd.android.package-archive',
code/file/mime_type_map.php: 0 => 'application/vnd.anser-web-certificate-issue-initiation',
code/file/mime_type_map.php: 0 => 'application/vnd.anser-web-funds-transfer-initiation',
code/file/mime_type_map.php: 0 => 'application/vnd.antix.game-component',
code/file/mime_type_map.php: 0 => 'application/vnd.astraea-software.iota',
code/file/mime_type_map.php: 0 => 'application/vnd.chipnuts.karaoke-mmd',
code/file/mime_type_map.php: 0 => 'application/vnd.cluetrust.cartomobile-config',
code/file/mime_type_map.php: 0 => 'application/vnd.cluetrust.cartomobile-config-pkg',
code/file/mime_type_map.php: 0 => 'application/vnd.ctc-posml',
code/file/mime_type_map.php: 0 => 'application/vnd.cups-ppd',
code/file/mime_type_map.php: 0 => 'application/vnd.data-vision.rdz',
code/file/mime_type_map.php: 0 => 'application/vnd.denovo.fcselayout-link',
code/file/mime_type_map.php: 0 => 'application/vnd.ds-keypoint',
code/file/mime_type_map.php: 0 => 'application/vnd.ezpix-album',
code/file/mime_type_map.php: 0 => 'application/vnd.ezpix-package',
code/file/mime_type_map.php: 0 => 'application/vnd.geometry-explorer',
code/file/mime_type_map.php: 0 => 'application/vnd.geometry-explorer',
code/file/mime_type_map.php: 0 => 'application/vnd.google-earth.kml+xml',
code/file/mime_type_map.php: 0 => 'application/vnd.google-earth.kmz',
code/file/mime_type_map.php: 0 => 'application/vnd.groove-account',
code/file/mime_type_map.php: 0 => 'application/vnd.groove-help',
code/file/mime_type_map.php: 0 => 'application/vnd.groove-identity-message',
code/file/mime_type_map.php: 0 => 'application/vnd.groove-injector',
code/file/mime_type_map.php: 0 => 'application/vnd.groove-tool-message',
code/file/mime_type_map.php: 0 => 'application/vnd.groove-tool-template',
code/file/mime_type_map.php: 0 => 'application/vnd.groove-vcard',
code/file/mime_type_map.php: 0 => 'application/vnd.handheld-entertainment+xml',
code/file/mime_type_map.php: 0 => 'application/vnd.hhe.lesson-player',
code/file/mime_type_map.php: 0 => 'application/vnd.hp-hpgl',
code/file/mime_type_map.php: 0 => 'application/vnd.hp-hpid',
code/file/mime_type_map.php: 0 => 'application/vnd.hp-hps',
code/file/mime_type_map.php: 0 => 'application/vnd.hp-jlyt',
code/file/mime_type_map.php: 0 => 'application/vnd.hp-pcl',
code/file/mime_type_map.php: 0 => 'application/vnd.hp-pclxl',
code/file/mime_type_map.php: 'sfd-hdstx' =>
code/file/mime_type_map.php: 0 => 'application/vnd.hydrostatix.sof-data',
code/file/mime_type_map.php: 0 => 'application/vnd.ibm.rights-management',
code/file/mime_type_map.php: 0 => 'application/vnd.ibm.secure-container',
code/file/mime_type_map.php: 0 => 'application/vnd.immervision-ivp',
code/file/mime_type_map.php: 0 => 'application/vnd.immervision-ivu',
code/file/mime_type_map.php: 0 => 'application/vnd.is-xpr',
code/file/mime_type_map.php: 0 => 'application/vnd.jcp.javame.midlet-rms',
code/file/mime_type_map.php: 0 => 'application/vnd.joost.joda-archive',
code/file/mime_type_map.php: 0 => 'application/vnd.kodak-descriptor',
code/file/mime_type_map.php: 0 => 'application/vnd.llamagraphics.life-balance.desktop',
code/file/mime_type_map.php: 0 => 'application/vnd.llamagraphics.life-balance.exchange+xml',
code/file/mime_type_map.php: 0 => 'application/vnd.lotus-1-2-3',
code/file/mime_type_map.php: 0 => 'application/vnd.lotus-approach',
code/file/mime_type_map.php: 0 => 'application/vnd.lotus-freelance',
code/file/mime_type_map.php: 0 => 'application/vnd.lotus-notes',
code/file/mime_type_map.php: 0 => 'application/vnd.lotus-organizer',
code/file/mime_type_map.php: 0 => 'application/vnd.lotus-screencam',
code/file/mime_type_map.php: 0 => 'application/vnd.lotus-wordpro',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-artgalry',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-cab-compressed',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-excel',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-excel',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-excel',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-excel',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-excel',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-excel',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-excel.addin.macroenabled.12',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-excel.sheet.macroenabled.12',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-excel.template.macroenabled.12',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-fontobject',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-htmlhelp',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-ims',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-lrm',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-officetheme',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-pki.seccat',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-pki.stl',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-powerpoint',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-powerpoint',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-powerpoint',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-powerpoint.addin.macroenabled.12',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-powerpoint.slide.macroenabled.12',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-powerpoint.template.macroenabled.12',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-project',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-project',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-word.document.macroenabled.12',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-word.template.macroenabled.12',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-works',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-works',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-works',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-works',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-wpl',
code/file/mime_type_map.php: 0 => 'application/vnd.ms-xpsdocument',
code/file/mime_type_map.php: 0 => 'application/vnd.noblenet-directory',
code/file/mime_type_map.php: 0 => 'application/vnd.noblenet-sealer',
code/file/mime_type_map.php: 0 => 'application/vnd.noblenet-web',
code/file/mime_type_map.php: 0 => 'application/vnd.nokia.n-gage.data',
code/file/mime_type_map.php: 'n-gage' =>
code/file/mime_type_map.php: 0 => 'application/vnd.nokia.n-gage.symbian.install',
code/file/mime_type_map.php: 0 => 'application/vnd.nokia.radio-preset',
code/file/mime_type_map.php: 0 => 'application/vnd.nokia.radio-presets',
code/file/mime_type_map.php: 0 => 'application/vnd.oasis.opendocument.chart-template',
code/file/mime_type_map.php: 0 => 'application/vnd.oasis.opendocument.formula-template',
code/file/mime_type_map.php: 0 => 'application/vnd.oasis.opendocument.graphics-template',
code/file/mime_type_map.php: 0 => 'application/vnd.oasis.opendocument.image-template',
code/file/mime_type_map.php: 0 => 'application/vnd.oasis.opendocument.presentation-template',
code/file/mime_type_map.php: 0 => 'application/vnd.oasis.opendocument.spreadsheet-template',
code/file/mime_type_map.php: 0 => 'application/vnd.oasis.opendocument.text-master',
code/file/mime_type_map.php: 0 => 'application/vnd.oasis.opendocument.text-template',
code/file/mime_type_map.php: 0 => 'application/vnd.oasis.opendocument.text-web',
code/file/mime_type_map.php: 0 => 'application/vnd.olpc-sugar',
code/file/mime_type_map.php: 0 => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
code/file/mime_type_map.php: 0 => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
code/file/mime_type_map.php: 0 => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
code/file/mime_type_map.php: 0 => 'application/vnd.openxmlformats-officedocument.presentationml.template',
code/file/mime_type_map.php: 0 => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
code/file/mime_type_map.php: 0 => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
code/file/mime_type_map.php: 0 => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
code/file/mime_type_map.php: 0 => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
code/file/mime_type_map.php: 0 => 'application/vnd.publishare-delta-tree',
code/file/mime_type_map.php: 0 => 'application/vnd.rn-realmedia',
code/file/mime_type_map.php: 0 => 'application/vnd.rn-realmedia-vbr',
code/file/mime_type_map.php: 0 => 'application/vnd.simtech-mindmapper',
code/file/mime_type_map.php: 0 => 'application/vnd.simtech-mindmapper',
code/file/mime_type_map.php: 0 => 'application/vnd.stardivision.writer-global',
code/file/mime_type_map.php: 0 => 'application/vnd.sus-calendar',
code/file/mime_type_map.php: 0 => 'application/vnd.sus-calendar',
code/file/mime_type_map.php: 0 => 'application/vnd.tao.intent-module-archive',
code/file/mime_type_map.php: 0 => 'application/vnd.tmobile-livetv',
code/file/mime_type_map.php: 0 => 'application/vnd.yamaha.hv-dic',
code/file/mime_type_map.php: 0 => 'application/vnd.yamaha.hv-script',
code/file/mime_type_map.php: 0 => 'application/vnd.yamaha.hv-voice',
code/file/mime_type_map.php: 0 => 'application/vnd.yamaha.smaf-audio',
code/file/mime_type_map.php: 0 => 'application/vnd.yamaha.smaf-phrase',
code/file/mime_type_map.php: 0 => 'application/vnd.yellowriver-custom-menu',
code/file/mime_type_map.php: 0 => 'application/x-7z-compressed',
code/file/mime_type_map.php: 0 => 'application/x-abiword',
code/file/mime_type_map.php: 0 => 'application/x-ace-compressed',
code/file/mime_type_map.php: 0 => 'application/x-apple-diskimage',
code/file/mime_type_map.php: 0 => 'application/x-authorware-bin',
code/file/mime_type_map.php: 0 => 'application/x-authorware-bin',
code/file/mime_type_map.php: 0 => 'application/x-authorware-bin',
code/file/mime_type_map.php: 0 => 'application/x-authorware-bin',
code/file/mime_type_map.php: 0 => 'application/x-authorware-map',
code/file/mime_type_map.php: 0 => 'application/x-authorware-seg',
code/file/mime_type_map.php: 0 => 'application/x-bcpio',
code/file/mime_type_map.php: 0 => 'application/x-bittorrent',
code/file/mime_type_map.php: 0 => 'application/x-blorb',
code/file/mime_type_map.php: 0 => 'application/x-blorb',
code/file/mime_type_map.php: 0 => 'application/x-bzip',
code/file/mime_type_map.php: 0 => 'application/x-bzip2',
code/file/mime_type_map.php: 0 => 'application/x-bzip2',
code/file/mime_type_map.php: 0 => 'application/x-cbr',
code/file/mime_type_map.php: 0 => 'application/x-cbr',
code/file/mime_type_map.php: 0 => 'application/x-cbr',
code/file/mime_type_map.php: 0 => 'application/x-cbr',
code/file/mime_type_map.php: 0 => 'application/x-cbr',
code/file/mime_type_map.php: 0 => 'application/x-cdlink',
code/file/mime_type_map.php: 0 => 'application/x-cfs-compressed',
code/file/mime_type_map.php: 0 => 'application/x-chat',
code/file/mime_type_map.php: 0 => 'application/x-chess-pgn',
code/file/mime_type_map.php: 0 => 'application/x-conference',
code/file/mime_type_map.php: 0 => 'application/x-cpio',
code/file/mime_type_map.php: 0 => 'application/x-csh',
code/file/mime_type_map.php: 0 => 'application/x-debian-package',
code/file/mime_type_map.php: 0 => 'application/x-debian-package',
code/file/mime_type_map.php: 0 => 'application/x-dgc-compressed',
code/file/mime_type_map.php: 0 => 'application/x-director',
code/file/mime_type_map.php: 0 => 'application/x-director',
code/file/mime_type_map.php: 0 => 'application/x-director',
code/file/mime_type_map.php: 0 => 'application/x-director',
code/file/mime_type_map.php: 0 => 'application/x-director',
code/file/mime_type_map.php: 0 => 'application/x-director',
code/file/mime_type_map.php: 0 => 'application/x-director',
code/file/mime_type_map.php: 0 => 'application/x-director',
code/file/mime_type_map.php: 0 => 'application/x-director',
code/file/mime_type_map.php: 0 => 'application/x-doom',
code/file/mime_type_map.php: 0 => 'application/x-dtbncx+xml',
code/file/mime_type_map.php: 0 => 'application/x-dtbook+xml',
code/file/mime_type_map.php: 0 => 'application/x-dtbresource+xml',
code/file/mime_type_map.php: 0 => 'application/x-dvi',
code/file/mime_type_map.php: 0 => 'application/x-envoy',
code/file/mime_type_map.php: 0 => 'application/x-eva',
code/file/mime_type_map.php: 0 => 'application/x-font-bdf',
code/file/mime_type_map.php: 0 => 'application/x-font-ghostscript',
code/file/mime_type_map.php: 0 => 'application/x-font-linux-psf',
code/file/mime_type_map.php: 0 => 'application/x-font-pcf',
code/file/mime_type_map.php: 0 => 'application/x-font-snf',
code/file/mime_type_map.php: 0 => 'application/x-font-type1',
code/file/mime_type_map.php: 0 => 'application/x-font-type1',
code/file/mime_type_map.php: 0 => 'application/x-font-type1',
code/file/mime_type_map.php: 0 => 'application/x-font-type1',
code/file/mime_type_map.php: 0 => 'application/x-freearc',
code/file/mime_type_map.php: 0 => 'application/x-futuresplash',
code/file/mime_type_map.php: 0 => 'application/x-gca-compressed',
code/file/mime_type_map.php: 0 => 'application/x-glulx',
code/file/mime_type_map.php: 0 => 'application/x-gnumeric',
code/file/mime_type_map.php: 0 => 'application/x-gramps-xml',
code/file/mime_type_map.php: 0 => 'application/x-gtar',
code/file/mime_type_map.php: 0 => 'application/x-hdf',
code/file/mime_type_map.php: 0 => 'application/x-install-instructions',
code/file/mime_type_map.php: 0 => 'application/x-iso9660-image',
code/file/mime_type_map.php: 0 => 'application/x-java-jnlp-file',
code/file/mime_type_map.php: 0 => 'application/x-latex',
code/file/mime_type_map.php: 0 => 'application/x-lzh-compressed',
code/file/mime_type_map.php: 0 => 'application/x-lzh-compressed',
code/file/mime_type_map.php: 0 => 'application/x-mie',
code/file/mime_type_map.php: 0 => 'application/x-mobipocket-ebook',
code/file/mime_type_map.php: 0 => 'application/x-mobipocket-ebook',
code/file/mime_type_map.php: 0 => 'application/x-ms-application',
code/file/mime_type_map.php: 0 => 'application/x-ms-shortcut',
code/file/mime_type_map.php: 0 => 'application/x-ms-wmd',
code/file/mime_type_map.php: 0 => 'application/x-ms-wmz',
code/file/mime_type_map.php: 1 => 'application/x-msmetafile',
code/file/mime_type_map.php: 0 => 'application/x-ms-xbap',
code/file/mime_type_map.php: 0 => 'application/x-msaccess',
code/file/mime_type_map.php: 0 => 'application/x-msbinder',
code/file/mime_type_map.php: 0 => 'application/x-mscardfile',
code/file/mime_type_map.php: 0 => 'application/x-msclip',
code/file/mime_type_map.php: 0 => 'application/x-msdownload',
code/file/mime_type_map.php: 0 => 'application/x-msdownload',
code/file/mime_type_map.php: 0 => 'application/x-msdownload',
code/file/mime_type_map.php: 0 => 'application/x-msdownload',
code/file/mime_type_map.php: 0 => 'application/x-msdownload',
code/file/mime_type_map.php: 0 => 'application/x-msmediaview',
code/file/mime_type_map.php: 0 => 'application/x-msmediaview',
code/file/mime_type_map.php: 0 => 'application/x-msmediaview',
code/file/mime_type_map.php: 0 => 'application/x-msmetafile',
code/file/mime_type_map.php: 0 => 'application/x-msmetafile',
code/file/mime_type_map.php: 0 => 'application/x-msmetafile',
code/file/mime_type_map.php: 0 => 'application/x-msmoney',
code/file/mime_type_map.php: 0 => 'application/x-mspublisher',
code/file/mime_type_map.php: 0 => 'application/x-msschedule',
code/file/mime_type_map.php: 0 => 'application/x-msterminal',
code/file/mime_type_map.php: 0 => 'application/x-mswrite',
code/file/mime_type_map.php: 0 => 'application/x-netcdf',
code/file/mime_type_map.php: 0 => 'application/x-netcdf',
code/file/mime_type_map.php: 0 => 'application/x-nzb',
code/file/mime_type_map.php: 0 => 'application/x-pkcs12',
code/file/mime_type_map.php: 0 => 'application/x-pkcs12',
code/file/mime_type_map.php: 0 => 'application/x-pkcs7-certificates',
code/file/mime_type_map.php: 0 => 'application/x-pkcs7-certificates',
code/file/mime_type_map.php: 0 => 'application/x-pkcs7-certreqresp',
code/file/mime_type_map.php: 0 => 'application/x-rar-compressed',
code/file/mime_type_map.php: 0 => 'application/x-research-info-systems',
code/file/mime_type_map.php: 0 => 'application/x-sh',
code/file/mime_type_map.php: 0 => 'application/x-shar',
code/file/mime_type_map.php: 0 => 'application/x-shockwave-flash',
code/file/mime_type_map.php: 0 => 'application/x-silverlight-app',
code/file/mime_type_map.php: 0 => 'application/x-sql',
code/file/mime_type_map.php: 0 => 'application/x-stuffit',
code/file/mime_type_map.php: 0 => 'application/x-stuffitx',
code/file/mime_type_map.php: 0 => 'application/x-subrip',
code/file/mime_type_map.php: 0 => 'application/x-sv4cpio',
code/file/mime_type_map.php: 0 => 'application/x-sv4crc',
code/file/mime_type_map.php: 0 => 'application/x-t3vm-image',
code/file/mime_type_map.php: 0 => 'application/x-tads',
code/file/mime_type_map.php: 0 => 'application/x-tar',
code/file/mime_type_map.php: 0 => 'application/x-tcl',
code/file/mime_type_map.php: 0 => 'application/x-tex',
code/file/mime_type_map.php: 0 => 'application/x-tex-tfm',
code/file/mime_type_map.php: 0 => 'application/x-texinfo',
code/file/mime_type_map.php: 0 => 'application/x-texinfo',
code/file/mime_type_map.php: 0 => 'application/x-tgif',
code/file/mime_type_map.php: 0 => 'application/x-ustar',
code/file/mime_type_map.php: 0 => 'application/x-wais-source',
code/file/mime_type_map.php: 0 => 'application/x-x509-ca-cert',
code/file/mime_type_map.php: 0 => 'application/x-x509-ca-cert',
code/file/mime_type_map.php: 0 => 'application/x-xfig',
code/file/mime_type_map.php: 0 => 'application/x-xliff+xml',
code/file/mime_type_map.php: 0 => 'application/x-xpinstall',
code/file/mime_type_map.php: 0 => 'application/x-xz',
code/file/mime_type_map.php: 0 => 'application/x-zmachine',
code/file/mime_type_map.php: 0 => 'application/x-zmachine',
code/file/mime_type_map.php: 0 => 'application/x-zmachine',
code/file/mime_type_map.php: 0 => 'application/x-zmachine',
code/file/mime_type_map.php: 0 => 'application/x-zmachine',
code/file/mime_type_map.php: 0 => 'application/x-zmachine',
code/file/mime_type_map.php: 0 => 'application/x-zmachine',
code/file/mime_type_map.php: 0 => 'application/x-zmachine',
code/file/mime_type_map.php: 0 => 'application/xcap-diff+xml',
code/file/mime_type_map.php: 0 => 'application/xml-dtd',
code/file/mime_type_map.php: 0 => 'audio/vnd.digital-winds',
code/file/mime_type_map.php: 0 => 'audio/vnd.ms-playready.media.pya',
code/file/mime_type_map.php: 0 => 'audio/x-aac',
code/file/mime_type_map.php: 0 => 'audio/x-aiff',
code/file/mime_type_map.php: 0 => 'audio/x-aiff',
code/file/mime_type_map.php: 0 => 'audio/x-aiff',
code/file/mime_type_map.php: 0 => 'audio/x-caf',
code/file/mime_type_map.php: 0 => 'audio/x-flac',
code/file/mime_type_map.php: 0 => 'audio/x-matroska',
code/file/mime_type_map.php: 0 => 'audio/x-mpegurl',
code/file/mime_type_map.php: 0 => 'audio/x-ms-wax',
code/file/mime_type_map.php: 0 => 'audio/x-ms-wma',
code/file/mime_type_map.php: 0 => 'audio/x-pn-realaudio',
code/file/mime_type_map.php: 0 => 'audio/x-pn-realaudio',
code/file/mime_type_map.php: 0 => 'audio/x-pn-realaudio-plugin',
code/file/mime_type_map.php: 0 => 'audio/x-wav',
code/file/mime_type_map.php: 0 => 'chemical/x-cdx',
code/file/mime_type_map.php: 0 => 'chemical/x-cif',
code/file/mime_type_map.php: 0 => 'chemical/x-cmdf',
code/file/mime_type_map.php: 0 => 'chemical/x-cml',
code/file/mime_type_map.php: 0 => 'chemical/x-csml',
code/file/mime_type_map.php: 0 => 'chemical/x-xyz',
code/file/mime_type_map.php: 0 => 'image/vnd.fujixerox.edmics-mmr',
code/file/mime_type_map.php: 0 => 'image/vnd.fujixerox.edmics-rlc',
code/file/mime_type_map.php: 0 => 'image/vnd.ms-modi',
code/file/mime_type_map.php: 0 => 'image/vnd.ms-photo',
code/file/mime_type_map.php: 0 => 'image/vnd.net-fpx',
code/file/mime_type_map.php: 0 => 'image/x-3ds',
code/file/mime_type_map.php: 0 => 'image/x-cmu-raster',
code/file/mime_type_map.php: 0 => 'image/x-cmx',
code/file/mime_type_map.php: 0 => 'image/x-freehand',
code/file/mime_type_map.php: 0 => 'image/x-freehand',
code/file/mime_type_map.php: 0 => 'image/x-freehand',
code/file/mime_type_map.php: 0 => 'image/x-freehand',
code/file/mime_type_map.php: 0 => 'image/x-freehand',
code/file/mime_type_map.php: 0 => 'image/x-icon',
code/file/mime_type_map.php: 0 => 'image/x-mrsid-image',
code/file/mime_type_map.php: 0 => 'image/x-pcx',
code/file/mime_type_map.php: 0 => 'image/x-pict',
code/file/mime_type_map.php: 0 => 'image/x-pict',
code/file/mime_type_map.php: 0 => 'image/x-portable-anymap',
code/file/mime_type_map.php: 0 => 'image/x-portable-bitmap',
code/file/mime_type_map.php: 0 => 'image/x-portable-graymap',
code/file/mime_type_map.php: 0 => 'image/x-portable-pixmap',
code/file/mime_type_map.php: 0 => 'image/x-rgb',
code/file/mime_type_map.php: 0 => 'image/x-tga',
code/file/mime_type_map.php: 0 => 'image/x-xbitmap',
code/file/mime_type_map.php: 0 => 'image/x-xpixmap',
code/file/mime_type_map.php: 0 => 'image/x-xwindowdump',
code/file/mime_type_map.php: 0 => 'text/cache-manifest',
code/file/mime_type_map.php: 0 => 'text/tab-separated-values',
code/file/mime_type_map.php: 0 => 'text/uri-list',
code/file/mime_type_map.php: 0 => 'text/uri-list',
code/file/mime_type_map.php: 0 => 'text/uri-list',
code/file/mime_type_map.php: 0 => 'text/vnd.sun.j2me.app-descriptor',
code/file/mime_type_map.php: 0 => 'text/x-asm',
code/file/mime_type_map.php: 0 => 'text/x-asm',
code/file/mime_type_map.php: 0 => 'text/x-c',
code/file/mime_type_map.php: 0 => 'text/x-c',
code/file/mime_type_map.php: 0 => 'text/x-c',
code/file/mime_type_map.php: 0 => 'text/x-c',
code/file/mime_type_map.php: 0 => 'text/x-c',
code/file/mime_type_map.php: 0 => 'text/x-c',
code/file/mime_type_map.php: 0 => 'text/x-c',
code/file/mime_type_map.php: 0 => 'text/x-fortran',
code/file/mime_type_map.php: 0 => 'text/x-fortran',
code/file/mime_type_map.php: 0 => 'text/x-fortran',
code/file/mime_type_map.php: 0 => 'text/x-fortran',
code/file/mime_type_map.php: 0 => 'text/x-java-source',
code/file/mime_type_map.php: 0 => 'text/x-nfo',
code/file/mime_type_map.php: 0 => 'text/x-opml',
code/file/mime_type_map.php: 0 => 'text/x-pascal',
code/file/mime_type_map.php: 0 => 'text/x-pascal',
code/file/mime_type_map.php: 0 => 'text/x-setext',
code/file/mime_type_map.php: 0 => 'text/x-sfv',
code/file/mime_type_map.php: 0 => 'text/x-uuencode',
code/file/mime_type_map.php: 0 => 'text/x-vcalendar',
code/file/mime_type_map.php: 0 => 'text/x-vcard',
code/file/mime_type_map.php: 0 => 'video/vnd.ms-playready.media.pyv',
code/file/mime_type_map.php: 0 => 'video/x-f4v',
code/file/mime_type_map.php: 0 => 'video/x-fli',
code/file/mime_type_map.php: 0 => 'video/x-flv',
code/file/mime_type_map.php: 0 => 'video/x-m4v',
code/file/mime_type_map.php: 0 => 'video/x-matroska',
code/file/mime_type_map.php: 0 => 'video/x-matroska',
code/file/mime_type_map.php: 0 => 'video/x-matroska',
code/file/mime_type_map.php: 0 => 'video/x-mng',
code/file/mime_type_map.php: 0 => 'video/x-ms-asf',
code/file/mime_type_map.php: 0 => 'video/x-ms-asf',
code/file/mime_type_map.php: 0 => 'video/x-ms-vob',
code/file/mime_type_map.php: 0 => 'video/x-ms-wm',
code/file/mime_type_map.php: 0 => 'video/x-ms-wmv',
code/file/mime_type_map.php: 0 => 'video/x-ms-wmx',
code/file/mime_type_map.php: 0 => 'video/x-ms-wvx',
code/file/mime_type_map.php: 0 => 'video/x-msvideo',
code/file/mime_type_map.php: 0 => 'video/x-sgi-movie',
code/file/mime_type_map.php: 0 => 'video/x-smv',
code/file/mime_type_map.php: 0 => 'x-conference/x-cooltalk',
code/file/mime_type_map.php: 'application/font-woff' =>
code/file/mime_type_map.php: 'application/x-font-otf' =>
code/file/mime_type_map.php: 'application/x-font-ttf' =>
code/file/mime_type_map.php: 'application/x-gzip' =>
code/file/mime_type_map.php: 'application/x-httpd-php' =>
code/file/mime_type_map.php: 'application/x-httpd-php-source' =>
code/file/mime_type_map.php: 'application/x-php' =>
code/file/mime_type_map.php: 'image/x-ms-bmp' =>
code/file/mime_type_map.php: 'text/x-php' =>
code/file/mime_type_map.php: 'application/andrew-inset' =>
code/file/mime_type_map.php: 'application/cdmi-capability' =>
code/file/mime_type_map.php: 'application/cdmi-container' =>
code/file/mime_type_map.php: 'application/cdmi-domain' =>
code/file/mime_type_map.php: 'application/cdmi-object' =>
code/file/mime_type_map.php: 'application/cdmi-queue' =>
code/file/mime_type_map.php: 'application/cu-seeme' =>
code/file/mime_type_map.php: 'application/font-tdpfr' =>
code/file/mime_type_map.php: 'application/java-archive' =>
code/file/mime_type_map.php: 'application/java-serialized-object' =>
code/file/mime_type_map.php: 'application/java-vm' =>
code/file/mime_type_map.php: 'application/mac-binhex40' =>
code/file/mime_type_map.php: 'application/mac-compactpro' =>
code/file/mime_type_map.php: 'application/octet-stream' =>
code/file/mime_type_map.php: 'application/oebps-package+xml' =>
code/file/mime_type_map.php: 'application/patch-ops-error+xml' =>
code/file/mime_type_map.php: 'application/pgp-encrypted' =>
code/file/mime_type_map.php: 'application/pgp-signature' =>
code/file/mime_type_map.php: 'application/pics-rules' =>
code/file/mime_type_map.php: 'application/pkcs7-mime' =>
code/file/mime_type_map.php: 'application/pkcs7-signature' =>
code/file/mime_type_map.php: 'application/pkix-attr-cert' =>
code/file/mime_type_map.php: 'application/pkix-cert' =>
code/file/mime_type_map.php: 'application/pkix-crl' =>
code/file/mime_type_map.php: 'application/pkix-pkipath' =>
code/file/mime_type_map.php: 'application/relax-ng-compact-syntax' =>
code/file/mime_type_map.php: 'application/resource-lists+xml' =>
code/file/mime_type_map.php: 'application/resource-lists-diff+xml' =>
code/file/mime_type_map.php: 'application/rls-services+xml' =>
code/file/mime_type_map.php: 'application/rpki-ghostbusters' =>
code/file/mime_type_map.php: 'application/rpki-manifest' =>
code/file/mime_type_map.php: 'application/rpki-roa' =>
code/file/mime_type_map.php: 'application/scvp-cv-request' =>
code/file/mime_type_map.php: 'application/scvp-cv-response' =>
code/file/mime_type_map.php: 'application/scvp-vp-request' =>
code/file/mime_type_map.php: 'application/scvp-vp-response' =>
code/file/mime_type_map.php: 'application/set-payment-initiation' =>
code/file/mime_type_map.php: 'application/set-registration-initiation' =>
code/file/mime_type_map.php: 'application/sparql-query' =>
code/file/mime_type_map.php: 'application/sparql-results+xml' =>
code/file/mime_type_map.php: 'application/timestamped-data' =>
code/file/mime_type_map.php: 'application/vnd.3gpp.pic-bw-large' =>
code/file/mime_type_map.php: 'application/vnd.3gpp.pic-bw-small' =>
code/file/mime_type_map.php: 'application/vnd.3gpp.pic-bw-var' =>
code/file/mime_type_map.php: 'application/vnd.3m.post-it-notes' =>
code/file/mime_type_map.php: 'application/vnd.adobe.air-application-installer-package+zip' =>
code/file/mime_type_map.php: 'application/vnd.android.package-archive' =>
code/file/mime_type_map.php: 'application/vnd.anser-web-certificate-issue-initiation' =>
code/file/mime_type_map.php: 'application/vnd.anser-web-funds-transfer-initiation' =>
code/file/mime_type_map.php: 'application/vnd.antix.game-component' =>
code/file/mime_type_map.php: 'application/vnd.astraea-software.iota' =>
code/file/mime_type_map.php: 'application/vnd.chipnuts.karaoke-mmd' =>
code/file/mime_type_map.php: 'application/vnd.cluetrust.cartomobile-config' =>
code/file/mime_type_map.php: 'application/vnd.cluetrust.cartomobile-config-pkg' =>
code/file/mime_type_map.php: 'application/vnd.ctc-posml' =>
code/file/mime_type_map.php: 'application/vnd.cups-ppd' =>
code/file/mime_type_map.php: 'application/vnd.data-vision.rdz' =>
code/file/mime_type_map.php: 'application/vnd.denovo.fcselayout-link' =>
code/file/mime_type_map.php: 'application/vnd.ds-keypoint' =>
code/file/mime_type_map.php: 'application/vnd.ezpix-album' =>
code/file/mime_type_map.php: 'application/vnd.ezpix-package' =>
code/file/mime_type_map.php: 'application/vnd.geometry-explorer' =>
code/file/mime_type_map.php: 'application/vnd.google-earth.kml+xml' =>
code/file/mime_type_map.php: 'application/vnd.google-earth.kmz' =>
code/file/mime_type_map.php: 'application/vnd.groove-account' =>
code/file/mime_type_map.php: 'application/vnd.groove-help' =>
code/file/mime_type_map.php: 'application/vnd.groove-identity-message' =>
code/file/mime_type_map.php: 'application/vnd.groove-injector' =>
code/file/mime_type_map.php: 'application/vnd.groove-tool-message' =>
code/file/mime_type_map.php: 'application/vnd.groove-tool-template' =>
code/file/mime_type_map.php: 'application/vnd.groove-vcard' =>
code/file/mime_type_map.php: 'application/vnd.handheld-entertainment+xml' =>
code/file/mime_type_map.php: 'application/vnd.hhe.lesson-player' =>
code/file/mime_type_map.php: 'application/vnd.hp-hpgl' =>
code/file/mime_type_map.php: 'application/vnd.hp-hpid' =>
code/file/mime_type_map.php: 'application/vnd.hp-hps' =>
code/file/mime_type_map.php: 'application/vnd.hp-jlyt' =>
code/file/mime_type_map.php: 'application/vnd.hp-pcl' =>
code/file/mime_type_map.php: 'application/vnd.hp-pclxl' =>
code/file/mime_type_map.php: 'application/vnd.hydrostatix.sof-data' =>
code/file/mime_type_map.php: 0 => 'sfd-hdstx',
code/file/mime_type_map.php: 'application/vnd.ibm.rights-management' =>
code/file/mime_type_map.php: 'application/vnd.ibm.secure-container' =>
code/file/mime_type_map.php: 'application/vnd.immervision-ivp' =>
code/file/mime_type_map.php: 'application/vnd.immervision-ivu' =>
code/file/mime_type_map.php: 'application/vnd.is-xpr' =>
code/file/mime_type_map.php: 'application/vnd.jcp.javame.midlet-rms' =>
code/file/mime_type_map.php: 'application/vnd.joost.joda-archive' =>
code/file/mime_type_map.php: 'application/vnd.kodak-descriptor' =>
code/file/mime_type_map.php: 'application/vnd.llamagraphics.life-balance.desktop' =>
code/file/mime_type_map.php: 'application/vnd.llamagraphics.life-balance.exchange+xml' =>
code/file/mime_type_map.php: 'application/vnd.lotus-1-2-3' =>
code/file/mime_type_map.php: 'application/vnd.lotus-approach' =>
code/file/mime_type_map.php: 'application/vnd.lotus-freelance' =>
code/file/mime_type_map.php: 'application/vnd.lotus-notes' =>
code/file/mime_type_map.php: 'application/vnd.lotus-organizer' =>
code/file/mime_type_map.php: 'application/vnd.lotus-screencam' =>
code/file/mime_type_map.php: 'application/vnd.lotus-wordpro' =>
code/file/mime_type_map.php: 'application/vnd.ms-artgalry' =>
code/file/mime_type_map.php: 'application/vnd.ms-cab-compressed' =>
code/file/mime_type_map.php: 'application/vnd.ms-excel' =>
code/file/mime_type_map.php: 'application/vnd.ms-excel.addin.macroenabled.12' =>
code/file/mime_type_map.php: 'application/vnd.ms-excel.sheet.binary.macroenabled.12' =>
code/file/mime_type_map.php: 'application/vnd.ms-excel.sheet.macroenabled.12' =>
code/file/mime_type_map.php: 'application/vnd.ms-excel.template.macroenabled.12' =>
code/file/mime_type_map.php: 'application/vnd.ms-fontobject' =>
code/file/mime_type_map.php: 'application/vnd.ms-htmlhelp' =>
code/file/mime_type_map.php: 'application/vnd.ms-ims' =>
code/file/mime_type_map.php: 'application/vnd.ms-lrm' =>
code/file/mime_type_map.php: 'application/vnd.ms-officetheme' =>
code/file/mime_type_map.php: 'application/vnd.ms-pki.seccat' =>
code/file/mime_type_map.php: 'application/vnd.ms-pki.stl' =>
code/file/mime_type_map.php: 'application/vnd.ms-powerpoint' =>
code/file/mime_type_map.php: 'application/vnd.ms-powerpoint.addin.macroenabled.12' =>
code/file/mime_type_map.php: 'application/vnd.ms-powerpoint.presentation.macroenabled.12' =>
code/file/mime_type_map.php: 'application/vnd.ms-powerpoint.slide.macroenabled.12' =>
code/file/mime_type_map.php: 'application/vnd.ms-powerpoint.slideshow.macroenabled.12' =>
code/file/mime_type_map.php: 'application/vnd.ms-powerpoint.template.macroenabled.12' =>
code/file/mime_type_map.php: 'application/vnd.ms-project' =>
code/file/mime_type_map.php: 'application/vnd.ms-word.document.macroenabled.12' =>
code/file/mime_type_map.php: 'application/vnd.ms-word.template.macroenabled.12' =>
code/file/mime_type_map.php: 'application/vnd.ms-works' =>
code/file/mime_type_map.php: 'application/vnd.ms-wpl' =>
code/file/mime_type_map.php: 'application/vnd.ms-xpsdocument' =>
code/file/mime_type_map.php: 'application/vnd.noblenet-directory' =>
code/file/mime_type_map.php: 'application/vnd.noblenet-sealer' =>
code/file/mime_type_map.php: 'application/vnd.noblenet-web' =>
code/file/mime_type_map.php: 'application/vnd.nokia.n-gage.data' =>
code/file/mime_type_map.php: 'application/vnd.nokia.n-gage.symbian.install' =>
code/file/mime_type_map.php: 0 => 'n-gage',
code/file/mime_type_map.php: 'application/vnd.nokia.radio-preset' =>
code/file/mime_type_map.php: 'application/vnd.nokia.radio-presets' =>
code/file/mime_type_map.php: 'application/vnd.oasis.opendocument.chart-template' =>
code/file/mime_type_map.php: 'application/vnd.oasis.opendocument.formula-template' =>
code/file/mime_type_map.php: 'application/vnd.oasis.opendocument.graphics-template' =>
code/file/mime_type_map.php: 'application/vnd.oasis.opendocument.image-template' =>
code/file/mime_type_map.php: 'application/vnd.oasis.opendocument.presentation-template' =>
code/file/mime_type_map.php: 'application/vnd.oasis.opendocument.spreadsheet-template' =>
code/file/mime_type_map.php: 'application/vnd.oasis.opendocument.text-master' =>
code/file/mime_type_map.php: 'application/vnd.oasis.opendocument.text-template' =>
code/file/mime_type_map.php: 'application/vnd.oasis.opendocument.text-web' =>
code/file/mime_type_map.php: 'application/vnd.olpc-sugar' =>
code/file/mime_type_map.php: 'application/vnd.openxmlformats-officedocument.presentationml.presentation' =>
code/file/mime_type_map.php: 'application/vnd.openxmlformats-officedocument.presentationml.slide' =>
code/file/mime_type_map.php: 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' =>
code/file/mime_type_map.php: 'application/vnd.openxmlformats-officedocument.presentationml.template' =>
code/file/mime_type_map.php: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' =>
code/file/mime_type_map.php: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' =>
code/file/mime_type_map.php: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' =>
code/file/mime_type_map.php: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' =>
code/file/mime_type_map.php: 'application/vnd.publishare-delta-tree' =>
code/file/mime_type_map.php: 'application/vnd.rn-realmedia' =>
code/file/mime_type_map.php: 'application/vnd.rn-realmedia-vbr' =>
code/file/mime_type_map.php: 'application/vnd.simtech-mindmapper' =>
code/file/mime_type_map.php: 'application/vnd.stardivision.writer-global' =>
code/file/mime_type_map.php: 'application/vnd.sus-calendar' =>
code/file/mime_type_map.php: 'application/vnd.tao.intent-module-archive' =>
code/file/mime_type_map.php: 'application/vnd.tmobile-livetv' =>
code/file/mime_type_map.php: 'application/vnd.yamaha.hv-dic' =>
code/file/mime_type_map.php: 'application/vnd.yamaha.hv-script' =>
code/file/mime_type_map.php: 'application/vnd.yamaha.hv-voice' =>
code/file/mime_type_map.php: 'application/vnd.yamaha.smaf-audio' =>
code/file/mime_type_map.php: 'application/vnd.yamaha.smaf-phrase' =>
code/file/mime_type_map.php: 'application/vnd.yellowriver-custom-menu' =>
code/file/mime_type_map.php: 'application/x-7z-compressed' =>
code/file/mime_type_map.php: 'application/x-abiword' =>
code/file/mime_type_map.php: 'application/x-ace-compressed' =>
code/file/mime_type_map.php: 'application/x-apple-diskimage' =>
code/file/mime_type_map.php: 'application/x-authorware-bin' =>
code/file/mime_type_map.php: 'application/x-authorware-map' =>
code/file/mime_type_map.php: 'application/x-authorware-seg' =>
code/file/mime_type_map.php: 'application/x-bcpio' =>
code/file/mime_type_map.php: 'application/x-bittorrent' =>
code/file/mime_type_map.php: 'application/x-blorb' =>
code/file/mime_type_map.php: 'application/x-bzip' =>
code/file/mime_type_map.php: 'application/x-bzip2' =>
code/file/mime_type_map.php: 'application/x-cbr' =>
code/file/mime_type_map.php: 'application/x-cdlink' =>
code/file/mime_type_map.php: 'application/x-cfs-compressed' =>
code/file/mime_type_map.php: 'application/x-chat' =>
code/file/mime_type_map.php: 'application/x-chess-pgn' =>
code/file/mime_type_map.php: 'application/x-conference' =>
code/file/mime_type_map.php: 'application/x-cpio' =>
code/file/mime_type_map.php: 'application/x-csh' =>
code/file/mime_type_map.php: 'application/x-debian-package' =>
code/file/mime_type_map.php: 'application/x-dgc-compressed' =>
code/file/mime_type_map.php: 'application/x-director' =>
code/file/mime_type_map.php: 'application/x-doom' =>
code/file/mime_type_map.php: 'application/x-dtbncx+xml' =>
code/file/mime_type_map.php: 'application/x-dtbook+xml' =>
code/file/mime_type_map.php: 'application/x-dtbresource+xml' =>
code/file/mime_type_map.php: 'application/x-dvi' =>
code/file/mime_type_map.php: 'application/x-envoy' =>
code/file/mime_type_map.php: 'application/x-eva' =>
code/file/mime_type_map.php: 'application/x-font-bdf' =>
code/file/mime_type_map.php: 'application/x-font-ghostscript' =>
code/file/mime_type_map.php: 'application/x-font-linux-psf' =>
code/file/mime_type_map.php: 'application/x-font-pcf' =>
code/file/mime_type_map.php: 'application/x-font-snf' =>
code/file/mime_type_map.php: 'application/x-font-type1' =>
code/file/mime_type_map.php: 'application/x-freearc' =>
code/file/mime_type_map.php: 'application/x-futuresplash' =>
code/file/mime_type_map.php: 'application/x-gca-compressed' =>
code/file/mime_type_map.php: 'application/x-glulx' =>
code/file/mime_type_map.php: 'application/x-gnumeric' =>
code/file/mime_type_map.php: 'application/x-gramps-xml' =>
code/file/mime_type_map.php: 'application/x-gtar' =>
code/file/mime_type_map.php: 'application/x-hdf' =>
code/file/mime_type_map.php: 'application/x-install-instructions' =>
code/file/mime_type_map.php: 'application/x-iso9660-image' =>
code/file/mime_type_map.php: 'application/x-java-jnlp-file' =>
code/file/mime_type_map.php: 'application/x-latex' =>
code/file/mime_type_map.php: 'application/x-lzh-compressed' =>
code/file/mime_type_map.php: 'application/x-mie' =>
code/file/mime_type_map.php: 'application/x-mobipocket-ebook' =>
code/file/mime_type_map.php: 'application/x-ms-application' =>
code/file/mime_type_map.php: 'application/x-ms-shortcut' =>
code/file/mime_type_map.php: 'application/x-ms-wmd' =>
code/file/mime_type_map.php: 'application/x-ms-wmz' =>
code/file/mime_type_map.php: 'application/x-ms-xbap' =>
code/file/mime_type_map.php: 'application/x-msaccess' =>
code/file/mime_type_map.php: 'application/x-msbinder' =>
code/file/mime_type_map.php: 'application/x-mscardfile' =>
code/file/mime_type_map.php: 'application/x-msclip' =>
code/file/mime_type_map.php: 'application/x-msdownload' =>
code/file/mime_type_map.php: 'application/x-msmediaview' =>
code/file/mime_type_map.php: 'application/x-msmetafile' =>
code/file/mime_type_map.php: 'application/x-msmoney' =>
code/file/mime_type_map.php: 'application/x-mspublisher' =>
code/file/mime_type_map.php: 'application/x-msschedule' =>
code/file/mime_type_map.php: 'application/x-msterminal' =>
code/file/mime_type_map.php: 'application/x-mswrite' =>
code/file/mime_type_map.php: 'application/x-netcdf' =>
code/file/mime_type_map.php: 'application/x-nzb' =>
code/file/mime_type_map.php: 'application/x-pkcs12' =>
code/file/mime_type_map.php: 'application/x-pkcs7-certificates' =>
code/file/mime_type_map.php: 'application/x-pkcs7-certreqresp' =>
code/file/mime_type_map.php: 'application/x-rar-compressed' =>
code/file/mime_type_map.php: 'application/x-research-info-systems' =>
code/file/mime_type_map.php: 'application/x-sh' =>
code/file/mime_type_map.php: 'application/x-shar' =>
code/file/mime_type_map.php: 'application/x-shockwave-flash' =>
code/file/mime_type_map.php: 'application/x-silverlight-app' =>
code/file/mime_type_map.php: 'application/x-sql' =>
code/file/mime_type_map.php: 'application/x-stuffit' =>
code/file/mime_type_map.php: 'application/x-stuffitx' =>
code/file/mime_type_map.php: 'application/x-subrip' =>
code/file/mime_type_map.php: 'application/x-sv4cpio' =>
code/file/mime_type_map.php: 'application/x-sv4crc' =>
code/file/mime_type_map.php: 'application/x-t3vm-image' =>
code/file/mime_type_map.php: 'application/x-tads' =>
code/file/mime_type_map.php: 'application/x-tar' =>
code/file/mime_type_map.php: 'application/x-tcl' =>
code/file/mime_type_map.php: 'application/x-tex' =>
code/file/mime_type_map.php: 'application/x-tex-tfm' =>
code/file/mime_type_map.php: 'application/x-texinfo' =>
code/file/mime_type_map.php: 'application/x-tgif' =>
code/file/mime_type_map.php: 'application/x-ustar' =>
code/file/mime_type_map.php: 'application/x-wais-source' =>
code/file/mime_type_map.php: 'application/x-x509-ca-cert' =>
code/file/mime_type_map.php: 'application/x-xfig' =>
code/file/mime_type_map.php: 'application/x-xliff+xml' =>
code/file/mime_type_map.php: 'application/x-xpinstall' =>
code/file/mime_type_map.php: 'application/x-xz' =>
code/file/mime_type_map.php: 'application/x-zmachine' =>
code/file/mime_type_map.php: 'application/xcap-diff+xml' =>
code/file/mime_type_map.php: 'application/xml-dtd' =>
code/file/mime_type_map.php: 'audio/vnd.digital-winds' =>
code/file/mime_type_map.php: 'audio/vnd.ms-playready.media.pya' =>
code/file/mime_type_map.php: 'audio/x-aac' =>
code/file/mime_type_map.php: 'audio/x-aiff' =>
code/file/mime_type_map.php: 'audio/x-caf' =>
code/file/mime_type_map.php: 'audio/x-flac' =>
code/file/mime_type_map.php: 'audio/x-matroska' =>
code/file/mime_type_map.php: 'audio/x-mpegurl' =>
code/file/mime_type_map.php: 'audio/x-ms-wax' =>
code/file/mime_type_map.php: 'audio/x-ms-wma' =>
code/file/mime_type_map.php: 'audio/x-pn-realaudio' =>
code/file/mime_type_map.php: 'audio/x-pn-realaudio-plugin' =>
code/file/mime_type_map.php: 'audio/x-wav' =>
code/file/mime_type_map.php: 'chemical/x-cdx' =>
code/file/mime_type_map.php: 'chemical/x-cif' =>
code/file/mime_type_map.php: 'chemical/x-cmdf' =>
code/file/mime_type_map.php: 'chemical/x-cml' =>
code/file/mime_type_map.php: 'chemical/x-csml' =>
code/file/mime_type_map.php: 'chemical/x-xyz' =>
code/file/mime_type_map.php: 'image/vnd.fujixerox.edmics-mmr' =>
code/file/mime_type_map.php: 'image/vnd.fujixerox.edmics-rlc' =>
code/file/mime_type_map.php: 'image/vnd.ms-modi' =>
code/file/mime_type_map.php: 'image/vnd.ms-photo' =>
code/file/mime_type_map.php: 'image/vnd.net-fpx' =>
code/file/mime_type_map.php: 'image/x-3ds' =>
code/file/mime_type_map.php: 'image/x-cmu-raster' =>
code/file/mime_type_map.php: 'image/x-cmx' =>
code/file/mime_type_map.php: 'image/x-freehand' =>
code/file/mime_type_map.php: 'image/x-icon' =>
code/file/mime_type_map.php: 'image/x-mrsid-image' =>
code/file/mime_type_map.php: 'image/x-pcx' =>
code/file/mime_type_map.php: 'image/x-pict' =>
code/file/mime_type_map.php: 'image/x-portable-anymap' =>
code/file/mime_type_map.php: 'image/x-portable-bitmap' =>
code/file/mime_type_map.php: 'image/x-portable-graymap' =>
code/file/mime_type_map.php: 'image/x-portable-pixmap' =>
code/file/mime_type_map.php: 'image/x-rgb' =>
code/file/mime_type_map.php: 'image/x-tga' =>
code/file/mime_type_map.php: 'image/x-xbitmap' =>
code/file/mime_type_map.php: 'image/x-xpixmap' =>
code/file/mime_type_map.php: 'image/x-xwindowdump' =>
code/file/mime_type_map.php: 'text/cache-manifest' =>
code/file/mime_type_map.php: 'text/tab-separated-values' =>
code/file/mime_type_map.php: 'text/uri-list' =>
code/file/mime_type_map.php: 'text/vnd.sun.j2me.app-descriptor' =>
code/file/mime_type_map.php: 'text/x-asm' =>
code/file/mime_type_map.php: 'text/x-c' =>
code/file/mime_type_map.php: 'text/x-fortran' =>
code/file/mime_type_map.php: 'text/x-java-source' =>
code/file/mime_type_map.php: 'text/x-nfo' =>
code/file/mime_type_map.php: 'text/x-opml' =>
code/file/mime_type_map.php: 'text/x-pascal' =>
code/file/mime_type_map.php: 'text/x-setext' =>
code/file/mime_type_map.php: 'text/x-sfv' =>
code/file/mime_type_map.php: 'text/x-uuencode' =>
code/file/mime_type_map.php: 'text/x-vcalendar' =>
code/file/mime_type_map.php: 'text/x-vcard' =>
code/file/mime_type_map.php: 'video/vnd.ms-playready.media.pyv' =>
code/file/mime_type_map.php: 'video/x-f4v' =>
code/file/mime_type_map.php: 'video/x-fli' =>
code/file/mime_type_map.php: 'video/x-flv' =>
code/file/mime_type_map.php: 'video/x-m4v' =>
code/file/mime_type_map.php: 'video/x-matroska' =>
code/file/mime_type_map.php: 'video/x-mng' =>
code/file/mime_type_map.php: 'video/x-ms-asf' =>
code/file/mime_type_map.php: 'video/x-ms-vob' =>
code/file/mime_type_map.php: 'video/x-ms-wm' =>
code/file/mime_type_map.php: 'video/x-ms-wmv' =>
code/file/mime_type_map.php: 'video/x-ms-wmx' =>
code/file/mime_type_map.php: 'video/x-ms-wvx' =>
code/file/mime_type_map.php: 'video/x-msvideo' =>
code/file/mime_type_map.php: 'video/x-sgi-movie' =>
code/file/mime_type_map.php: 'video/x-smv' =>
code/file/mime_type_map.php: 'x-conference/x-cooltalk' =>
code/file/mime_types/wof.txt:application/font-woff
code/file/mime_types/otf.txt:application/x-font-otf
code/file/mime_types/ttf.txt:application/x-font-ttf
code/file/mime_types/ttc.txt:application/x-font-ttf
code/file/mime_types/zip.txt:application/x-gzip
code/file/mime_types/bmp.txt:image/x-ms-bmp
code/file/mime_types/ez.txt:application/andrew-inset
code/file/mime_types/cdmia.txt:application/cdmi-capability
code/file/mime_types/cdmic.txt:application/cdmi-container
code/file/mime_types/cdmid.txt:application/cdmi-domain
code/file/mime_types/cdmio.txt:application/cdmi-object
code/file/mime_types/cdmiq.txt:application/cdmi-queue
code/file/mime_types/cu.txt:application/cu-seeme
code/file/mime_types/pfr.txt:application/font-tdpfr
code/file/mime_types/jar.txt:application/java-archive
code/file/mime_types/ser.txt:application/java-serialized-object
code/file/mime_types/class.txt:application/java-vm
code/file/mime_types/hqx.txt:application/mac-binhex40
code/file/mime_types/cpt.txt:application/mac-compactpro
code/file/mime_types/bin.txt:application/octet-stream
code/file/mime_types/dms.txt:application/octet-stream
code/file/mime_types/lrf.txt:application/octet-stream
code/file/mime_types/mar.txt:application/octet-stream
code/file/mime_types/so.txt:application/octet-stream
code/file/mime_types/dist.txt:application/octet-stream
code/file/mime_types/distz.txt:application/octet-stream
code/file/mime_types/pkg.txt:application/octet-stream
code/file/mime_types/bpk.txt:application/octet-stream
code/file/mime_types/dump.txt:application/octet-stream
code/file/mime_types/elc.txt:application/octet-stream
code/file/mime_types/deploy.txt:application/octet-stream
code/file/mime_types/opf.txt:application/oebps-package+xml
code/file/mime_types/xer.txt:application/patch-ops-error+xml
code/file/mime_types/pgp.txt:application/pgp-encrypted
code/file/mime_types/asc.txt:application/pgp-signature
code/file/mime_types/sig.txt:application/pgp-signature
code/file/mime_types/prf.txt:application/pics-rules
code/file/mime_types/p7m.txt:application/pkcs7-mime
code/file/mime_types/p7c.txt:application/pkcs7-mime
code/file/mime_types/p7s.txt:application/pkcs7-signature
code/file/mime_types/ac.txt:application/pkix-attr-cert
code/file/mime_types/cer.txt:application/pkix-cert
code/file/mime_types/crl.txt:application/pkix-crl
code/file/mime_types/pkipath.txt:application/pkix-pkipath
code/file/mime_types/rnc.txt:application/relax-ng-compact-syntax
code/file/mime_types/rl.txt:application/resource-lists+xml
code/file/mime_types/rld.txt:application/resource-lists-diff+xml
code/file/mime_types/rs.txt:application/rls-services+xml
code/file/mime_types/gbr.txt:application/rpki-ghostbusters
code/file/mime_types/mft.txt:application/rpki-manifest
code/file/mime_types/roa.txt:application/rpki-roa
code/file/mime_types/scq.txt:application/scvp-cv-request
code/file/mime_types/scs.txt:application/scvp-cv-response
code/file/mime_types/spq.txt:application/scvp-vp-request
code/file/mime_types/spp.txt:application/scvp-vp-response
code/file/mime_types/setpay.txt:application/set-payment-initiation
code/file/mime_types/setreg.txt:application/set-registration-initiation
code/file/mime_types/rq.txt:application/sparql-query
code/file/mime_types/srx.txt:application/sparql-results+xml
code/file/mime_types/tsd.txt:application/timestamped-data
code/file/mime_types/plb.txt:application/vnd.3gpp.pic-bw-large
code/file/mime_types/psb.txt:application/vnd.3gpp.pic-bw-small
code/file/mime_types/pvb.txt:application/vnd.3gpp.pic-bw-var
code/file/mime_types/pwn.txt:application/vnd.3m.post-it-notes
code/file/mime_types/air.txt:application/vnd.adobe.air-application-installer-package+zip
code/file/mime_types/apk.txt:application/vnd.android.package-archive
code/file/mime_types/cii.txt:application/vnd.anser-web-certificate-issue-initiation
code/file/mime_types/fti.txt:application/vnd.anser-web-funds-transfer-initiation
code/file/mime_types/atx.txt:application/vnd.antix.game-component
code/file/mime_types/iota.txt:application/vnd.astraea-software.iota
code/file/mime_types/mmd.txt:application/vnd.chipnuts.karaoke-mmd
code/file/mime_types/c11amc.txt:application/vnd.cluetrust.cartomobile-config
code/file/mime_types/c11amz.txt:application/vnd.cluetrust.cartomobile-config-pkg
code/file/mime_types/pml.txt:application/vnd.ctc-posml
code/file/mime_types/ppd.txt:application/vnd.cups-ppd
code/file/mime_types/rdz.txt:application/vnd.data-vision.rdz
code/file/mime_types/fe_launch.txt:application/vnd.denovo.fcselayout-link
code/file/mime_types/kpxx.txt:application/vnd.ds-keypoint
code/file/mime_types/ez2.txt:application/vnd.ezpix-album
code/file/mime_types/ez3.txt:application/vnd.ezpix-package
code/file/mime_types/gex.txt:application/vnd.geometry-explorer
code/file/mime_types/gre.txt:application/vnd.geometry-explorer
code/file/mime_types/kml.txt:application/vnd.google-earth.kml+xml
code/file/mime_types/kmz.txt:application/vnd.google-earth.kmz
code/file/mime_types/gac.txt:application/vnd.groove-account
code/file/mime_types/ghf.txt:application/vnd.groove-help
code/file/mime_types/gim.txt:application/vnd.groove-identity-message
code/file/mime_types/grv.txt:application/vnd.groove-injector
code/file/mime_types/gtm.txt:application/vnd.groove-tool-message
code/file/mime_types/tpl.txt:application/vnd.groove-tool-template
code/file/mime_types/vcg.txt:application/vnd.groove-vcard
code/file/mime_types/zmm.txt:application/vnd.handheld-entertainment+xml
code/file/mime_types/les.txt:application/vnd.hhe.lesson-player
code/file/mime_types/hpgl.txt:application/vnd.hp-hpgl
code/file/mime_types/hpid.txt:application/vnd.hp-hpid
code/file/mime_types/hps.txt:application/vnd.hp-hps
code/file/mime_types/jlt.txt:application/vnd.hp-jlyt
code/file/mime_types/pcl.txt:application/vnd.hp-pcl
code/file/mime_types/pclxl.txt:application/vnd.hp-pclxl
code/file/mime_types/sfd-hdstx.txt:application/vnd.hydrostatix.sof-data
code/file/mime_types/irm.txt:application/vnd.ibm.rights-management
code/file/mime_types/sc.txt:application/vnd.ibm.secure-container
code/file/mime_types/ivp.txt:application/vnd.immervision-ivp
code/file/mime_types/ivu.txt:application/vnd.immervision-ivu
code/file/mime_types/xpr.txt:application/vnd.is-xpr
code/file/mime_types/rms.txt:application/vnd.jcp.javame.midlet-rms
code/file/mime_types/joda.txt:application/vnd.joost.joda-archive
code/file/mime_types/sse.txt:application/vnd.kodak-descriptor
code/file/mime_types/lbd.txt:application/vnd.llamagraphics.life-balance.desktop
code/file/mime_types/lbe.txt:application/vnd.llamagraphics.life-balance.exchange+xml
code/file/mime_types/123.txt:application/vnd.lotus-1-2-3
code/file/mime_types/apr.txt:application/vnd.lotus-approach
code/file/mime_types/pre.txt:application/vnd.lotus-freelance
code/file/mime_types/nsf.txt:application/vnd.lotus-notes
code/file/mime_types/org.txt:application/vnd.lotus-organizer
code/file/mime_types/scm.txt:application/vnd.lotus-screencam
code/file/mime_types/lwp.txt:application/vnd.lotus-wordpro
code/file/mime_types/cil.txt:application/vnd.ms-artgalry
code/file/mime_types/cab.txt:application/vnd.ms-cab-compressed
code/file/mime_types/xls.txt:application/vnd.ms-excel
code/file/mime_types/xlm.txt:application/vnd.ms-excel
code/file/mime_types/xla.txt:application/vnd.ms-excel
code/file/mime_types/xlc.txt:application/vnd.ms-excel
code/file/mime_types/xlt.txt:application/vnd.ms-excel
code/file/mime_types/xlw.txt:application/vnd.ms-excel
code/file/mime_types/xlam.txt:application/vnd.ms-excel.addin.macroenabled.12
code/file/mime_types/xlsb.txt:application/vnd.ms-excel.sheet.binary.macroenabled.12
code/file/mime_types/xlsm.txt:application/vnd.ms-excel.sheet.macroenabled.12
code/file/mime_types/xltm.txt:application/vnd.ms-excel.template.macroenabled.12
code/file/mime_types/eot.txt:application/vnd.ms-fontobject
code/file/mime_types/chm.txt:application/vnd.ms-htmlhelp
code/file/mime_types/ims.txt:application/vnd.ms-ims
code/file/mime_types/lrm.txt:application/vnd.ms-lrm
code/file/mime_types/thmx.txt:application/vnd.ms-officetheme
code/file/mime_types/cat.txt:application/vnd.ms-pki.seccat
code/file/mime_types/stl.txt:application/vnd.ms-pki.stl
code/file/mime_types/ppt.txt:application/vnd.ms-powerpoint
code/file/mime_types/pps.txt:application/vnd.ms-powerpoint
code/file/mime_types/pot.txt:application/vnd.ms-powerpoint
code/file/mime_types/ppam.txt:application/vnd.ms-powerpoint.addin.macroenabled.12
code/file/mime_types/pptm.txt:application/vnd.ms-powerpoint.presentation.macroenabled.12
code/file/mime_types/sldm.txt:application/vnd.ms-powerpoint.slide.macroenabled.12
code/file/mime_types/ppsm.txt:application/vnd.ms-powerpoint.slideshow.macroenabled.12
code/file/mime_types/potm.txt:application/vnd.ms-powerpoint.template.macroenabled.12
code/file/mime_types/mpp.txt:application/vnd.ms-project
code/file/mime_types/mpt.txt:application/vnd.ms-project
code/file/mime_types/docm.txt:application/vnd.ms-word.document.macroenabled.12
code/file/mime_types/dotm.txt:application/vnd.ms-word.template.macroenabled.12
code/file/mime_types/wps.txt:application/vnd.ms-works
code/file/mime_types/wks.txt:application/vnd.ms-works
code/file/mime_types/wcm.txt:application/vnd.ms-works
code/file/mime_types/wdb.txt:application/vnd.ms-works
code/file/mime_types/wpl.txt:application/vnd.ms-wpl
code/file/mime_types/xps.txt:application/vnd.ms-xpsdocument
code/file/mime_types/nnd.txt:application/vnd.noblenet-directory
code/file/mime_types/nns.txt:application/vnd.noblenet-sealer
code/file/mime_types/nnw.txt:application/vnd.noblenet-web
code/file/mime_types/ngdat.txt:application/vnd.nokia.n-gage.data
code/file/mime_types/n-gage.txt:application/vnd.nokia.n-gage.symbian.install
code/file/mime_types/rpst.txt:application/vnd.nokia.radio-preset
code/file/mime_types/rpss.txt:application/vnd.nokia.radio-presets
code/file/mime_types/otc.txt:application/vnd.oasis.opendocument.chart-template
code/file/mime_types/odft.txt:application/vnd.oasis.opendocument.formula-template
code/file/mime_types/otg.txt:application/vnd.oasis.opendocument.graphics-template
code/file/mime_types/oti.txt:application/vnd.oasis.opendocument.image-template
code/file/mime_types/otp.txt:application/vnd.oasis.opendocument.presentation-template
code/file/mime_types/ots.txt:application/vnd.oasis.opendocument.spreadsheet-template
code/file/mime_types/odm.txt:application/vnd.oasis.opendocument.text-master
code/file/mime_types/ott.txt:application/vnd.oasis.opendocument.text-template
code/file/mime_types/oth.txt:application/vnd.oasis.opendocument.text-web
code/file/mime_types/xo.txt:application/vnd.olpc-sugar
code/file/mime_types/pptx.txt:application/vnd.openxmlformats-officedocument.presentationml.presentation
code/file/mime_types/sldx.txt:application/vnd.openxmlformats-officedocument.presentationml.slide
code/file/mime_types/ppsx.txt:application/vnd.openxmlformats-officedocument.presentationml.slideshow
code/file/mime_types/potx.txt:application/vnd.openxmlformats-officedocument.presentationml.template
code/file/mime_types/xlsx.txt:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
code/file/mime_types/xltx.txt:application/vnd.openxmlformats-officedocument.spreadsheetml.template
code/file/mime_types/docx.txt:application/vnd.openxmlformats-officedocument.wordprocessingml.document
code/file/mime_types/dotx.txt:application/vnd.openxmlformats-officedocument.wordprocessingml.template
code/file/mime_types/qps.txt:application/vnd.publishare-delta-tree
code/file/mime_types/rm.txt:application/vnd.rn-realmedia
code/file/mime_types/rmvb.txt:application/vnd.rn-realmedia-vbr
code/file/mime_types/twd.txt:application/vnd.simtech-mindmapper
code/file/mime_types/twds.txt:application/vnd.simtech-mindmapper
code/file/mime_types/sgl.txt:application/vnd.stardivision.writer-global
code/file/mime_types/sus.txt:application/vnd.sus-calendar
code/file/mime_types/susp.txt:application/vnd.sus-calendar
code/file/mime_types/tao.txt:application/vnd.tao.intent-module-archive
code/file/mime_types/tmo.txt:application/vnd.tmobile-livetv
code/file/mime_types/hvd.txt:application/vnd.yamaha.hv-dic
code/file/mime_types/hvs.txt:application/vnd.yamaha.hv-script
code/file/mime_types/hvp.txt:application/vnd.yamaha.hv-voice
code/file/mime_types/saf.txt:application/vnd.yamaha.smaf-audio
code/file/mime_types/spf.txt:application/vnd.yamaha.smaf-phrase
code/file/mime_types/cmp.txt:application/vnd.yellowriver-custom-menu
code/file/mime_types/7z.txt:application/x-7z-compressed
code/file/mime_types/abw.txt:application/x-abiword
code/file/mime_types/ace.txt:application/x-ace-compressed
code/file/mime_types/dmg.txt:application/x-apple-diskimage
code/file/mime_types/aab.txt:application/x-authorware-bin
code/file/mime_types/x32.txt:application/x-authorware-bin
code/file/mime_types/u32.txt:application/x-authorware-bin
code/file/mime_types/vox.txt:application/x-authorware-bin
code/file/mime_types/aam.txt:application/x-authorware-map
code/file/mime_types/aas.txt:application/x-authorware-seg
code/file/mime_types/bcpio.txt:application/x-bcpio
code/file/mime_types/torrent.txt:application/x-bittorrent
code/file/mime_types/blb.txt:application/x-blorb
code/file/mime_types/blorb.txt:application/x-blorb
code/file/mime_types/bz.txt:application/x-bzip
code/file/mime_types/bz2.txt:application/x-bzip2
code/file/mime_types/boz.txt:application/x-bzip2
code/file/mime_types/cbr.txt:application/x-cbr
code/file/mime_types/cba.txt:application/x-cbr
code/file/mime_types/cbt.txt:application/x-cbr
code/file/mime_types/cbz.txt:application/x-cbr
code/file/mime_types/cb7.txt:application/x-cbr
code/file/mime_types/vcd.txt:application/x-cdlink
code/file/mime_types/cfs.txt:application/x-cfs-compressed
code/file/mime_types/chat.txt:application/x-chat
code/file/mime_types/pgn.txt:application/x-chess-pgn
code/file/mime_types/nsc.txt:application/x-conference
code/file/mime_types/cpio.txt:application/x-cpio
code/file/mime_types/csh.txt:application/x-csh
code/file/mime_types/deb.txt:application/x-debian-package
code/file/mime_types/udeb.txt:application/x-debian-package
code/file/mime_types/dgc.txt:application/x-dgc-compressed
code/file/mime_types/dir.txt:application/x-director
code/file/mime_types/dcr.txt:application/x-director
code/file/mime_types/dxr.txt:application/x-director
code/file/mime_types/cst.txt:application/x-director
code/file/mime_types/cct.txt:application/x-director
code/file/mime_types/cxt.txt:application/x-director
code/file/mime_types/w3d.txt:application/x-director
code/file/mime_types/fgd.txt:application/x-director
code/file/mime_types/swa.txt:application/x-director
code/file/mime_types/wad.txt:application/x-doom
code/file/mime_types/ncx.txt:application/x-dtbncx+xml
code/file/mime_types/dtb.txt:application/x-dtbook+xml
code/file/mime_types/res.txt:application/x-dtbresource+xml
code/file/mime_types/dvi.txt:application/x-dvi
code/file/mime_types/evy.txt:application/x-envoy
code/file/mime_types/eva.txt:application/x-eva
code/file/mime_types/bdf.txt:application/x-font-bdf
code/file/mime_types/gsf.txt:application/x-font-ghostscript
code/file/mime_types/psf.txt:application/x-font-linux-psf
code/file/mime_types/pcf.txt:application/x-font-pcf
code/file/mime_types/snf.txt:application/x-font-snf
code/file/mime_types/pfa.txt:application/x-font-type1
code/file/mime_types/pfb.txt:application/x-font-type1
code/file/mime_types/pfm.txt:application/x-font-type1
code/file/mime_types/afm.txt:application/x-font-type1
code/file/mime_types/arc.txt:application/x-freearc
code/file/mime_types/spl.txt:application/x-futuresplash
code/file/mime_types/gca.txt:application/x-gca-compressed
code/file/mime_types/ulx.txt:application/x-glulx
code/file/mime_types/gnumeric.txt:application/x-gnumeric
code/file/mime_types/gramps.txt:application/x-gramps-xml
code/file/mime_types/gtar.txt:application/x-gtar
code/file/mime_types/hdf.txt:application/x-hdf
code/file/mime_types/install.txt:application/x-install-instructions
code/file/mime_types/iso.txt:application/x-iso9660-image
code/file/mime_types/jnlp.txt:application/x-java-jnlp-file
code/file/mime_types/latex.txt:application/x-latex
code/file/mime_types/lzh.txt:application/x-lzh-compressed
code/file/mime_types/lha.txt:application/x-lzh-compressed
code/file/mime_types/mie.txt:application/x-mie
code/file/mime_types/prc.txt:application/x-mobipocket-ebook
code/file/mime_types/mobi.txt:application/x-mobipocket-ebook
code/file/mime_types/application.txt:application/x-ms-application
code/file/mime_types/lnk.txt:application/x-ms-shortcut
code/file/mime_types/wmd.txt:application/x-ms-wmd
code/file/mime_types/wmz.txt:application/x-ms-wmz
code/file/mime_types/xbap.txt:application/x-ms-xbap
code/file/mime_types/mdb.txt:application/x-msaccess
code/file/mime_types/obd.txt:application/x-msbinder
code/file/mime_types/crd.txt:application/x-mscardfile
code/file/mime_types/clp.txt:application/x-msclip
code/file/mime_types/exe.txt:application/x-msdownload
code/file/mime_types/dll.txt:application/x-msdownload
code/file/mime_types/com.txt:application/x-msdownload
code/file/mime_types/bat.txt:application/x-msdownload
code/file/mime_types/msi.txt:application/x-msdownload
code/file/mime_types/mvb.txt:application/x-msmediaview
code/file/mime_types/m13.txt:application/x-msmediaview
code/file/mime_types/m14.txt:application/x-msmediaview
code/file/mime_types/wmf.txt:application/x-msmetafile
code/file/mime_types/emf.txt:application/x-msmetafile
code/file/mime_types/emz.txt:application/x-msmetafile
code/file/mime_types/mny.txt:application/x-msmoney
code/file/mime_types/pub.txt:application/x-mspublisher
code/file/mime_types/scd.txt:application/x-msschedule
code/file/mime_types/trm.txt:application/x-msterminal
code/file/mime_types/wri.txt:application/x-mswrite
code/file/mime_types/nc.txt:application/x-netcdf
code/file/mime_types/cdf.txt:application/x-netcdf
code/file/mime_types/nzb.txt:application/x-nzb
code/file/mime_types/p12.txt:application/x-pkcs12
code/file/mime_types/pfx.txt:application/x-pkcs12
code/file/mime_types/p7b.txt:application/x-pkcs7-certificates
code/file/mime_types/spc.txt:application/x-pkcs7-certificates
code/file/mime_types/p7r.txt:application/x-pkcs7-certreqresp
code/file/mime_types/rar.txt:application/x-rar-compressed
code/file/mime_types/ris.txt:application/x-research-info-systems
code/file/mime_types/sh.txt:application/x-sh
code/file/mime_types/shar.txt:application/x-shar
code/file/mime_types/swf.txt:application/x-shockwave-flash
code/file/mime_types/xap.txt:application/x-silverlight-app
code/file/mime_types/sql.txt:application/x-sql
code/file/mime_types/sit.txt:application/x-stuffit
code/file/mime_types/sitx.txt:application/x-stuffitx
code/file/mime_types/srt.txt:application/x-subrip
code/file/mime_types/sv4cpio.txt:application/x-sv4cpio
code/file/mime_types/sv4crc.txt:application/x-sv4crc
code/file/mime_types/t3.txt:application/x-t3vm-image
code/file/mime_types/gam.txt:application/x-tads
code/file/mime_types/tar.txt:application/x-tar
code/file/mime_types/tcl.txt:application/x-tcl
code/file/mime_types/tex.txt:application/x-tex
code/file/mime_types/tfm.txt:application/x-tex-tfm
code/file/mime_types/texinfo.txt:application/x-texinfo
code/file/mime_types/texi.txt:application/x-texinfo
code/file/mime_types/obj.txt:application/x-tgif
code/file/mime_types/ustar.txt:application/x-ustar
code/file/mime_types/src.txt:application/x-wais-source
code/file/mime_types/der.txt:application/x-x509-ca-cert
code/file/mime_types/crt.txt:application/x-x509-ca-cert
code/file/mime_types/fig.txt:application/x-xfig
code/file/mime_types/xlf.txt:application/x-xliff+xml
code/file/mime_types/xpi.txt:application/x-xpinstall
code/file/mime_types/xz.txt:application/x-xz
code/file/mime_types/z1.txt:application/x-zmachine
code/file/mime_types/z2.txt:application/x-zmachine
code/file/mime_types/z3.txt:application/x-zmachine
code/file/mime_types/z4.txt:application/x-zmachine
code/file/mime_types/z5.txt:application/x-zmachine
code/file/mime_types/z6.txt:application/x-zmachine
code/file/mime_types/z7.txt:application/x-zmachine
code/file/mime_types/z8.txt:application/x-zmachine
code/file/mime_types/xdf.txt:application/xcap-diff+xml
code/file/mime_types/dtd.txt:application/xml-dtd
code/file/mime_types/eol.txt:audio/vnd.digital-winds
code/file/mime_types/pya.txt:audio/vnd.ms-playready.media.pya
code/file/mime_types/aac.txt:audio/x-aac
code/file/mime_types/aif.txt:audio/x-aiff
code/file/mime_types/aiff.txt:audio/x-aiff
code/file/mime_types/aifc.txt:audio/x-aiff
code/file/mime_types/caf.txt:audio/x-caf
code/file/mime_types/flac.txt:audio/x-flac
code/file/mime_types/mka.txt:audio/x-matroska
code/file/mime_types/m3u.txt:audio/x-mpegurl
code/file/mime_types/wax.txt:audio/x-ms-wax
code/file/mime_types/wma.txt:audio/x-ms-wma
code/file/mime_types/ram.txt:audio/x-pn-realaudio
code/file/mime_types/ra.txt:audio/x-pn-realaudio
code/file/mime_types/rmp.txt:audio/x-pn-realaudio-plugin
code/file/mime_types/wav.txt:audio/x-wav
code/file/mime_types/cdx.txt:chemical/x-cdx
code/file/mime_types/cif.txt:chemical/x-cif
code/file/mime_types/cmdf.txt:chemical/x-cmdf
code/file/mime_types/cml.txt:chemical/x-cml
code/file/mime_types/csml.txt:chemical/x-csml
code/file/mime_types/xyz.txt:chemical/x-xyz
code/file/mime_types/mmr.txt:image/vnd.fujixerox.edmics-mmr
code/file/mime_types/rlc.txt:image/vnd.fujixerox.edmics-rlc
code/file/mime_types/mdi.txt:image/vnd.ms-modi
code/file/mime_types/wdp.txt:image/vnd.ms-photo
code/file/mime_types/npx.txt:image/vnd.net-fpx
code/file/mime_types/3ds.txt:image/x-3ds
code/file/mime_types/ras.txt:image/x-cmu-raster
code/file/mime_types/cmx.txt:image/x-cmx
code/file/mime_types/fh.txt:image/x-freehand
code/file/mime_types/fhc.txt:image/x-freehand
code/file/mime_types/fh4.txt:image/x-freehand
code/file/mime_types/fh5.txt:image/x-freehand
code/file/mime_types/fh7.txt:image/x-freehand
code/file/mime_types/ico.txt:image/x-icon
code/file/mime_types/sid.txt:image/x-mrsid-image
code/file/mime_types/pcx.txt:image/x-pcx
code/file/mime_types/pic.txt:image/x-pict
code/file/mime_types/pct.txt:image/x-pict
code/file/mime_types/pnm.txt:image/x-portable-anymap
code/file/mime_types/pbm.txt:image/x-portable-bitmap
code/file/mime_types/pgm.txt:image/x-portable-graymap
code/file/mime_types/ppm.txt:image/x-portable-pixmap
code/file/mime_types/rgb.txt:image/x-rgb
code/file/mime_types/tga.txt:image/x-tga
code/file/mime_types/xbm.txt:image/x-xbitmap
code/file/mime_types/xpm.txt:image/x-xpixmap
code/file/mime_types/xwd.txt:image/x-xwindowdump
code/file/mime_types/appcache.txt:text/cache-manifest
code/file/mime_types/tsv.txt:text/tab-separated-values
code/file/mime_types/uri.txt:text/uri-list
code/file/mime_types/uris.txt:text/uri-list
code/file/mime_types/urls.txt:text/uri-list
code/file/mime_types/jad.txt:text/vnd.sun.j2me.app-descriptor
code/file/mime_types/s.txt:text/x-asm
code/file/mime_types/asm.txt:text/x-asm
code/file/mime_types/c.txt:text/x-c
code/file/mime_types/cc.txt:text/x-c
code/file/mime_types/cxx.txt:text/x-c
code/file/mime_types/cpp.txt:text/x-c
code/file/mime_types/h.txt:text/x-c
code/file/mime_types/hh.txt:text/x-c
code/file/mime_types/dic.txt:text/x-c
code/file/mime_types/f.txt:text/x-fortran
code/file/mime_types/for.txt:text/x-fortran
code/file/mime_types/f77.txt:text/x-fortran
code/file/mime_types/f90.txt:text/x-fortran
code/file/mime_types/java.txt:text/x-java-source
code/file/mime_types/nfo.txt:text/x-nfo
code/file/mime_types/opml.txt:text/x-opml
code/file/mime_types/p.txt:text/x-pascal
code/file/mime_types/pas.txt:text/x-pascal
code/file/mime_types/etx.txt:text/x-setext
code/file/mime_types/sfv.txt:text/x-sfv
code/file/mime_types/uu.txt:text/x-uuencode
code/file/mime_types/vcs.txt:text/x-vcalendar
code/file/mime_types/vcf.txt:text/x-vcard
code/file/mime_types/pyv.txt:video/vnd.ms-playready.media.pyv
code/file/mime_types/f4v.txt:video/x-f4v
code/file/mime_types/fli.txt:video/x-fli
code/file/mime_types/flv.txt:video/x-flv
code/file/mime_types/m4v.txt:video/x-m4v
code/file/mime_types/mkv.txt:video/x-matroska
code/file/mime_types/mk3d.txt:video/x-matroska
code/file/mime_types/mks.txt:video/x-matroska
code/file/mime_types/mng.txt:video/x-mng
code/file/mime_types/asf.txt:video/x-ms-asf
code/file/mime_types/asx.txt:video/x-ms-asf
code/file/mime_types/vob.txt:video/x-ms-vob
code/file/mime_types/wm.txt:video/x-ms-wm
code/file/mime_types/wmv.txt:video/x-ms-wmv
code/file/mime_types/wmx.txt:video/x-ms-wmx
code/file/mime_types/wvx.txt:video/x-ms-wvx
code/file/mime_types/avi.txt:video/x-msvideo
code/file/mime_types/movie.txt:video/x-sgi-movie
code/file/mime_types/smv.txt:video/x-smv
code/file/mime_types/ice.txt:x-conference/x-cooltalk
code/view/error/header.php:if ($header = $lia->addons['server']['error']->headerMessage){
code/view/theme.css: flex-direction:column;
code/view/theme.css: background: var(--cHead);
code/view/theme.css: background: var(--cMain);
code/view/theme.css: background: var(--cFoot);
code/view/theme.php: <?=$lia->getHeadHtml();?>
code/view/theme.php: <?=$lia->view('error/header');?>
code/addon/Autoload.php: $this->methods['autoload'] = [$this, 'addDir'];
code/addon/Autoload.php: $this->dirs = &$this->props['dirs'];
code/addon/Autoload.php: $this->dirs = $this->dirs ?? [];
code/addon/Autoload.php: * add a directory to be autoloaded, psr4-ish
code/addon/Autoload.php: * @usage `$lia->autoload(__DIR__.'/class/');`
code/addon/Autoload.php: * @usage `$autoload->addDir(__DIR__.'/class/', '\\Tlf');`. `\\Tlf` makes it so a class `\\Tlf\Something` can be autoloaded at `__DIR__.'/class/Something.php'`
code/addon/Autoload.php: $this->dirs[$dir] = $baseNamespaces;
code/addon/Autoload.php: $this->psr4_autoload($class);
code/addon/Autoload.php: foreach ($this->dirs as $dir=>$namespaces){
code/addon/View.php.bak: * @todo enable fallback-namespacing when default namespace (null) is not set. So you can add view `lia:theme`, then load view `theme` and get `lia:theme`
code/addon/View.php.bak: * @warning conflictMode has a weird interaction with null-namespace views. If you add `ns:viewname`, then try to add `viewname` a conflict will now be generated because `ns:viewname` sets null-namespace `viewname`.
code/addon/View.php.bak: * @option throw - throw an exception
code/addon/View.php.bak: * @option ignore - don't add the new view (use the old one)
code/addon/View.php.bak: * @option overwrite - replace the old view with the new one
code/addon/View.php.bak: $this->props['views'] = &$this->views;
code/addon/View.php.bak: $this->props['conflictMode'] = $this->props['conflictMode'] ?? $this->conflictMode;
code/addon/View.php.bak: $this->conflictMode = &$this->props['conflictMode'];
code/addon/View.php.bak: $this->props['globalArgs'] = $this->props['globalArgs'] ?? $this->globalArgs;
code/addon/View.php.bak: $this->globalArgs = &$this->props['globalArgs'];
code/addon/View.php.bak: $this->methods['setViewConflictMode'] = [$this, 'setConflictMode'];
code/addon/View.php.bak: $this->methods['addViewCallable'] = [$this, 'addCallable'];
code/addon/View.php.bak: $this->methods['addView'] = [$this, 'addViewHandler'];
code/addon/View.php.bak: $this->methods['view'] = [$this, 'view'];
code/addon/View.php.bak: $this->addViewHandler($class, $callable, $viewName, $args);
code/addon/View.php.bak: * @note null-namespace refers to `$lia->view('view-name')`
code/addon/View.php.bak: * @note namespace refers to `$lia->view('namespace:view-name')`
code/addon/View.php.bak: * @note Always sets null-namespace view if it's not already set. (ignores conflictMode)
code/addon/View.php.bak: if (isset($this->views[$namespace][$viewName])){
code/addon/View.php.bak: $cm = $this->conflictMode;
code/addon/View.php.bak: 'lia'=>$this->_lia,
code/addon/View.php.bak: $this->views[$namespace][$viewName] = $viewData;
code/addon/View.php.bak: $this->views[null][$viewName] = $this->views[null][$viewName] ?? $viewData;
code/addon/View.php.bak: $view_ns = $this->views[$namespace];
code/addon/View.php.bak: // $globalArgs = $this->lia->api('lia:globalparams.getAll');
code/addon/View.php.bak: $globalArgs = $this->globalArgs;
code/addon/Error.php: $lia = $this->lia;
code/addon/Error.php: $this->methods['error_header'] = [$this, 'error_header'];
code/addon/Error.php: $this->methods['error_page'] = [$this, 'error_page'];
code/addon/Error.php: $this->methods['error_goto'] = [$this, 'error_goto'];
code/addon/Error.php: $this->headerError = &$this->props['headerError'];
code/addon/Error.php: $this->statusCode = &$this->props['statusCode'];
code/addon/Error.php: $this->pageMessage = &$this->props['pageMessage'];
code/addon/Error.php: $this->headerMessage = &$this->props['headerMessage'];
code/addon/Error.php: $this->gotoMessage = &$this->props['gotoMessage'];
code/addon/Error.php: $this->props['isPageHeader'] = $this->props['isPageHeader'] ?? $this->isPageError;
code/addon/Error.php: $this->isPageError = &$this->props['isPageError'];
code/addon/Error.php: $this->scan('on', $this);
code/addon/Error.php: // $this->lia->props['hooks']['ResponseReady'][] = [$this, 'onResponseReady'];
code/addon/Error.php: // $this->hook('ResponseReady', [$this, 'onResponseReady']);
code/addon/Error.php: $this->gotoMessage = $message;
code/addon/Error.php: $this->statusCode = $statusCode;
code/addon/Error.php: $this->headerMessage = $message;
code/addon/Error.php: $this->statusCode = $statusCode;
code/addon/Error.php: $this->statusCode = $statusCode;
code/addon/Error.php: $this->pageMessage = $message;
code/addon/Error.php: if ($this->gotoMessage!=null){
code/addon/Error.php: $this->lia->api('lia:goto.withMessage', $this->errorUrl(), $this->gotoMessage);
code/addon/Error.php: $this->lia->api('lia:goto.setHeadersNow');
code/addon/Error.php: if ($this->statusCode!=null){
code/addon/Error.php: $response->addHeader('HTTP/1.0 '.$this->statusCode.' '.$this->statusCodeText($this->statusCode));
code/addon/Error.php: if ($this->pageMessage!==null){
code/addon/Error.php: $response->content = $this->lia->api('lia:view.get','error/page',['message'=>$this->pageMessage]);
code/addon/Error.php: // if ($codes===null)$codes = require($this->package->dir().'/file/http_status_codes.php');
code/addon/Hook.php: $this->hooks = $this->props['hooks'] ?? $this->hooks;
code/addon/Hook.php: $this->props['hooks'] = &$this->hooks;
code/addon/Hook.php: $this->methods['hook'] = [$this, 'add'];
code/addon/Hook.php: $this->methods['call_hook'] = [$this, 'call'];
code/addon/Hook.php: $this->prefixes['on'] = [$this, 'prefix_method_added'];
code/addon/Hook.php: $this->add($hook_name, [$obj, $method]);
code/addon/Hook.php: $this->hooks[$name][] = $callable;
code/addon/Hook.php: foreach ($this->hooks[$name]??[] as $h){
code/addon/Hook.php: // $this->lia->api('lia:event.schedule', $eventName, $callable);
code/addon/ResourceSorter.php: $this->methods['setResourceOrder'] = [$this,'setResourceOrder'];
code/addon/ResourceSorter.php: if (!$this->didSet){
code/addon/ResourceSorter.php: $this->setResourceSorter($ext, [$this, 'getSortedFiles']);
code/addon/ResourceSorter.php: if ($index=array_search($n,$this->orders)){
code/addon/ResourceSorter.php: unset($this->orders[$ext][$index]);
code/addon/ResourceSorter.php: array_unshift($this->orders[$ext], $n);
code/addon/ResourceSorter.php: $orders = $this->orders[$ext];
code/addon/ResourceSorter.php: $bits = array_slice($parts, -$c);
code/addon/Seo.php: * https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started
code/addon/Seo.php: $this->props['seo'] = $this->props['seo'] ?? $this->seo;
code/addon/Seo.php: $this->seo = &$this->props['seo'];
code/addon/Seo.php: $this->props['html'] = $this->props['html'] ?? $this->html;
code/addon/Seo.php: $this->html = &$this->props['html'];
code/addon/Seo.php: $this->methods['seo'] = [$this, 'seo'];
code/addon/Seo.php: $this->methods['seoTitle'] = [$this, 'title'];
code/addon/Seo.php: $this->methods['seoDescription'] = [$this, 'description'];
code/addon/Seo.php: $this->methods['seoImage'] = [$this, 'image'];
code/addon/Seo.php: $this->methods['seoUrl'] = [$this, 'url'];
code/addon/Seo.php: $this->methods['seoSiteName'] = [$this, 'site_name'];
code/addon/Seo.php: $this->methods['getSeoHtml'] = [$this, 'get_html'];
code/addon/Seo.php: if (is_array($value))$this->$key(...$value);
code/addon/Seo.php: else $this->$key($value);
code/addon/Seo.php: $this->seo['title'] = $title;
code/addon/Seo.php: $this->html['title'] = [
code/addon/Seo.php: $this->seo['description'] = $description;
code/addon/Seo.php: $this->html['description'] = [
code/addon/Seo.php: $this->seo['image'] = $url;
code/addon/Seo.php: $this->seo['image:alt'] = $altText;
code/addon/Seo.php: $this->html['image'] = [
code/addon/Seo.php: $this->html['image:alt'] = [
code/addon/Seo.php: $this->seo['url'] = $url;
code/addon/Seo.php: $this->html['url'] = [
code/addon/Seo.php: $this->seo['siteName'] = $siteName;
code/addon/Seo.php: $this->html['siteName'] = [
code/addon/Seo.php: $this->seo['keywords'] = $keywords;
code/addon/Seo.php: $this->html['keywords'] = [
code/addon/Seo.php: foreach ($this->html as $html_list){
code/addon/Cache.php: * Key=>values that get written to disk in a single file (call $cache->write())
code/addon/Cache.php: $this->dir = &$this->props['dir'];
code/addon/Cache.php: $this->props['main'] = $this->props['main'] ?? $this->main;
code/addon/Cache.php: $this->main = &$this->props['main'];
code/addon/Cache.php: $this->props['enabled'] = $this->props['enabled'] ?? $this->enabled;
code/addon/Cache.php: $this->enabled = &$this->props['enabled'];
code/addon/Cache.php: $this->methods['cache'] = [$this, 'set'];
code/addon/Cache.php: $this->methods['cache_get'] = [$this, 'get'];
code/addon/Cache.php: $this->methods['cache_write'] = [$this, 'write'];
code/addon/Cache.php: $this->methods['cache_read'] = [$this, 'read'];
code/addon/Cache.php: $this->methods['cache_file'] = [$this, 'cache_file'];
code/addon/Cache.php: $this->methods['cache_get_file'] = [$this, 'get_cache_file_content'];
code/addon/Cache.php: return $this->dir.'/'.$this->main;
code/addon/Cache.php: $this->props = include($this->main_file_path());
code/addon/Cache.php: file_put_contents($this->main_file_path(), '<?php return '.var_export($this->props,true).';');
code/addon/Cache.php: // if ($this->lia->hasApi('lia:config.default')){
code/addon/Cache.php: // $this->lia->api('lia:config.default', 'lia:cache.dir', $this->package->dir('cache'));
code/addon/Cache.php: // $this->lia->api('lia:config.default', 'lia:cache.clearAfterXMinutes', 60*24*5);
code/addon/Cache.php: // $this->lia->api('lia:config.default', 'lia:cache.enable', true);
code/addon/Cache.php: // if ($this->isStaleCacheCheckRequired()){
code/addon/Cache.php: // $this->deleteStaleCacheFiles();
code/addon/Cache.php: if (!$this->enabled)return false;
code/addon/Cache.php: $file = $this->cache_file_path($key);
code/addon/Cache.php: $meta = $this->cache_meta_file_path($key);
code/addon/Cache.php: $file = $this->get_cache_file_path($key);
code/addon/Cache.php: * @todo auto-delete stale cache files (depending on a config)
code/addon/Cache.php: if ($this->is_cache_file_valid($key))return $this->cache_file_path($key);
code/addon/Cache.php: if ($this->dir==null){
code/addon/Cache.php: return $this->dir.'/'.$key.'.file';
code/addon/Cache.php: if ($this->dir==null)return false;
code/addon/Cache.php: return $this->dir.'/'.$key.'.meta';
code/addon/Cache.php: $file = $this->cache_file_path($key);
code/addon/Cache.php: if ($file==false || !$this->enabled)return;
code/addon/Cache.php: $meta_file = $this->cache_meta_file_path($key);
code/addon/Cache.php: $this->create_dir($dir);
code/addon/Cache.php: if ($this->is_stale_cache_check_required()){
code/addon/Cache.php: $this->run_delete_stale_files();
code/addon/Cache.php: $dir = $this->dir;
code/addon/Cache.php: $endLen = -1 * strlen('}');
code/addon/Cache.php: $tail = substr($f,-5);
code/addon/Cache.php: $meta_file = substr($f,0,-5).'.meta'; // remove '.file' & put '.meta'
code/addon/Cache.php: $frequency = $this->stale_check_frequency;
code/addon/Cache.php: $last_check = $this->get('cache.last_stale_check', 0);
code/addon/Cache.php: // // get cache-clearing frequency (lia config)
code/addon/Cache.php: // $frequencyInMinutes = $this->lia->api('lia:config.get', 'lia:cache.clearAfterXMinutes');
code/addon/Cache.php: // // check when last cache-clear was performed
code/addon/Cache.php: // $path = $this->lia->getCachedFilePath('lia.Cache.LastCleanupCheck');
code/addon/Cache.php: $this->lia->cacheFile('lia.Cache.LastCleanupCheck', time(), 60*60*24*180);
code/addon/Cache.php: $dir = $this->lia->api('lia:config.get', 'lia:cache.dir');
code/addon/Cache.php: $endLen = -1 * strlen('}');
code/addon/Cache.php: if (substr($f,0,5)!='meta-')continue;
code/addon/Cache.php: $actualFile = $dir.'/file-'.substr($f, 5);
code/addon/Resources.php: * @todo Auto-add charset=utf8 & viewport meta tags (with to disable)
code/addon/Resources.php: $lia = $this->lia;
code/addon/Resources.php: $lia->methods['setResourceSorter'] = [$this,'setSorter'];
code/addon/Resources.php: $lia->methods['addResourceFile'] = [$this,'addFile'];
code/addon/Resources.php: $lia->methods['addResourceUrl'] = [$this,'addUrl'];
code/addon/Resources.php: $lia->methods['getResourceHtml'] = [$this,'getHtml'];
code/addon/Resources.php: $lia->methods['getHeadHtml'] = [$this,'getHtml'];
code/addon/Resources.php: $this->minify = $this->props['minify'] ?? $this->minify;
code/addon/Resources.php: $this->props['minify'] = &$this->minify;
code/addon/Resources.php: if ($_GET['minify']=='true')$this->minify = true;
code/addon/Resources.php: else if ($_GET['minify']=='false')$this->minify = false;
code/addon/Resources.php: $this->useCache = $this->props['useCache'] ?? $this->useCache;
code/addon/Resources.php: $this->props['useCache'] = &$this->useCache;
code/addon/Resources.php: $this->files = $this->props['files'] ?? $this->files;
code/addon/Resources.php: $this->props['files'] = &$this->files;
code/addon/Resources.php: $this->urls = $this->props['urls'] ?? $this->urls;
code/addon/Resources.php: $this->props['urls'] = &$this->urls;
code/addon/Resources.php: $this->scan('route');
code/addon/Resources.php: $this->cleanExt($ext);
code/addon/Resources.php: $this->sorter[$ext] = $sorter;
code/addon/Resources.php: $this->cleanExt($ext);
code/addon/Resources.php: $this->files[$ext][$file] = $file;
code/addon/Resources.php: $this->cleanExt($ext);
code/addon/Resources.php: $this->urls[$ext][] = $url;
code/addon/Resources.php: $seo_html = isset($this->methods['getSeoHtml']) ?
code/addon/Resources.php: ' '.str_replace("\n","\n ",$this->getSeoHtml())."\n"
code/addon/Resources.php: .' '.$this->getFileTag('js')."\n"
code/addon/Resources.php: .' '.$this->getFileTag('css')."\n"
code/addon/Resources.php: .' '.$this->getUrlTag('js')."\n"
code/addon/Resources.php: .' '.$this->getUrlTag('css')."\n"
code/addon/Resources.php: // .' '.$this->getScriptCodeTag()."\n"
code/addon/Resources.php: // .' '.$this->getStyleCodeTag()."\n"
code/addon/Resources.php: $jsMapFile = $this->cache_get_file($this->cacheMapName('js'));
code/addon/Resources.php: $cssMapFile = $this->cache_get_file($this->cacheMapName('css'));
code/addon/Resources.php: $useCache = $this->useCache;
code/addon/Resources.php: $response->useTheme = false;
code/addon/Resources.php: $shortName = substr($route->url(),1);
code/addon/Resources.php: $this->cleanExt($ext);
code/addon/Resources.php: $cacheFileName = $this->cacheMapName($ext);
code/addon/Resources.php: $fPath = $this->addons['cache']->get_cache_file_path($shortName);
code/addon/Resources.php: $response->addHeaders($staticFile->getContentTypeHeaders());
code/addon/Resources.php: $response->addHeaders($staticFile->getCacheHeaders());
code/addon/Resources.php: if ($staticFile->userHasFileCached){
code/addon/Resources.php: $response->sendContent = false;
code/addon/Resources.php: $response->content = $c;
code/addon/Resources.php: $cacheFileName = $this->cacheMapName($ext);
code/addon/Resources.php: $cacheFPath = $this->addons['cache']->get_cache_file_path($cacheFileName);
code/addon/Resources.php: $response->content = '/* file not found */';
code/addon/Resources.php: $files = explode('--',$longName);
code/addon/Resources.php: $respone->content .= "\n/* there is a missing file */\n";
code/addon/Resources.php: $response->content .= "\n".file_get_contents($file)."\n";
code/addon/Resources.php: $this->cleanExt($ext);
code/addon/Resources.php: $url = $this->getCompiledFilesUrl($ext);
code/addon/Resources.php: $this->cleanExt($ext);
code/addon/Resources.php: foreach (($this->urls[$ext]??[]) as $url){
code/addon/Resources.php: $this->cleanExt($ext);
code/addon/Resources.php: $files = $this->files[$ext] ?? [];
code/addon/Resources.php: $sorter = $this->sorter[$ext] ?? null;
code/addon/Resources.php: $this->cleanExt($ext);
code/addon/Resources.php: $files = $this->getSortedFiles($ext);
code/addon/Resources.php: $this->cleanExt($ext);
code/addon/Resources.php: $files = $this->getSortedFiles($ext);
code/addon/Resources.php: $longName = implode('--',$files);
code/addon/Resources.php: $this->cleanExt($ext);
code/addon/Resources.php: $lia = $this->lia;
code/addon/Resources.php: $longName = $this->concatenateFileNames($ext);
code/addon/Resources.php: $cachedMapName = $this->cacheMapName($ext);
code/addon/Resources.php: $files = $this->cache_get_file($cachedMapName);
code/addon/Resources.php: if ($this->minify)$min = 'min.';
code/addon/Resources.php: $shortName = $files[$longName] ?? 'lia-resource.'.uniqid().'.'.$min.$ext;
code/addon/Resources.php: $cachedFile = $this->addons['cache']->get_cache_file_path($shortName);
code/addon/Resources.php: if ($cachedFile&&$this->useCache)return $cachedFile;
code/addon/Resources.php: $content = $this->concatenateFiles($ext);
code/addon/Resources.php: if ($this->minify){
code/addon/Resources.php: $content = $this->minifyFiles($content,$ext);
code/addon/Resources.php: $path = $this->cache_file($shortName, $content, 60*60*24*30);
code/addon/Resources.php: $this->cache_file($cachedMapName, json_encode($files), 60*60*24*30);
code/addon/Resources.php: $this->cleanExt($ext);
code/addon/Resources.php: $file = $this->compileFilesToCache($ext);
code/addon/Resources.php: $longName = $this->concatenateFileNames($ext);
code/addon/Resources.php: $files = $this->cache_get_file($this->cacheMapName($ext));
code/addon/Resources.php: // css + js minifier (codeigniter): https://github.com/slav123/CodeIgniter-minify
code/addon/Resources.php: // // $csstidy->set_cfg('optimise_shorthands', 2);
code/addon/Resources.php: // $csstidy->set_cfg('template', 'high');
code/addon/Resources.php: // $csstidy->parse($fileContent);
code/addon/Resources.php: // $css_code_opt = $csstidy->print->plain();
code/addon/Router.php: * @todo handleBlog(){} to respond to a request, routeBlog(){} to get an array of routes (which auto-point to handleBlog(){}))
code/addon/Router.php: public $varDelim = '\\.\\/\\-\\:';
code/addon/Router.php: $lia = $this->lia;
code/addon/Router.php: $this->prefixes['route'] = [$this, 'handle_route_prefix_method'];
code/addon/Router.php: $this->props['routers'] = $this->props['routers'] ?? $this->routers;
code/addon/Router.php: $this->routers = &$this->props['routers'];
code/addon/Router.php: $this->props['varDelim'] = $this->props['varDelim'] ?? $this->varDelim;
code/addon/Router.php: $this->varDelim = &$this->props['varDelim'];
code/addon/Router.php: $this->methods['addRoute'] = [$this, 'addRoute'];
code/addon/Router.php: $this->methods['route'] = [$this, 'route'];
code/addon/Router.php: $this->methods['clean_url'] = [$this, 'clean_url'];
code/addon/Router.php: // $lia->addApi('lia:route.deriveFromCallable',[$this,'deriveRouteUrls']);
code/addon/Router.php: // $lia->addApiPrefix('lia:route.deriveFromCallable', 'route');
code/addon/Router.php: $patterns[$f] = $prefix.$this->fileToPattern($f);
code/addon/Router.php: // $hidden = $this->props['route']['hidden_extensions'];
code/addon/Router.php: $pattern = substr($pattern,0,-(strlen($ext)+1));
code/addon/Router.php: // $indexNames = $this->props['route']['index_names'];
code/addon/Router.php: $pattern = substr($pattern,0,-strlen($base));
code/addon/Router.php: // &&$this->config['route']['force_trail_slash'])$pattern .= '/';
code/addon/Router.php: * @param $dot_name not used here, but is intended to be an all-lowercase version of the method name without the prefix with dots in place of underscores
code/addon/Router.php: $patterns = $object->$m(false);
code/addon/Router.php: $this->addRoute($pattern, [$object, $m]);
code/addon/Router.php: $initialParsed = $this->decode_pattern($pattern);
code/addon/Router.php: $list = $this->separate_optional_from_decoded_pattern($initialParsed);
code/addon/Router.php: $this->routeMap[$m][$testPattern][] = $decoded;
code/addon/Router.php: $this->routers[] = $router;
code/addon/Router.php: $url = $request->url();
code/addon/Router.php: $method = $request->method();
code/addon/Router.php: foreach ($this->routers as $r){
code/addon/Router.php: $testReg = $this->url_to_regex($url);
code/addon/Router.php: $all = array_filter($this->routeMap[$method]??[],
code/addon/Router.php: $paramaters = $this->extract_url_paramaters($routeInfo, $url);
code/addon/Router.php: * The patterns apply both for the `public` dir and by adding routes via `$lia->addRoute()`. The file extension (for .php) is removed prior to calling decode_pattern()
code/addon/Router.php: * The delimiters can be changed globally by setting $router->varDelims
code/addon/Router.php: * - /blog/{category}/{post} is valid for url /blog/black-lives/matter
code/addon/Router.php: * - /blog/{category}.{post}/ is valid for url /blog/environment.zero-waste/
code/addon/Router.php: * - /blog/{category}{post}/ is valid for url /blog/{category}{post}/ and has NO dynamic paramaters
code/addon/Router.php: * - /blog/{category}/@GET.{post}/ is valid for GET /blog/kindness/is-awesome/ but not for POST request
code/addon/Router.php: * - /@POST.dir/sub/@GET.file/ is valid for both POST /dir/sub/file/ and GET /dir/sub/file/
code/addon/Router.php: * - We do not currently check the name of the method, just @ABCDEF for length 3-7
code/addon/Router.php: * - These must appear after a `/` or after another '@METHOD.' or they will be taken literally
code/addon/Router.php: * - lower case is not valid
code/addon/Router.php: * - Each method MUST be followed by a period (.)
code/addon/Router.php: * - NEW: Dynamic portions may be separated by by (-) and/or (:)
code/addon/Router.php: * - {under_scoreCamel} specifies a named, dynamic paramater
code/addon/Router.php: * - {param} must be surrounded by path delimiters (/) OR periods (.) which will be literal characters in the url
code/addon/Router.php: * - {param} MAY be at the end of a pattern with no trailing delimiter
code/addon/Router.php: * - {paramName:regex} would specify a dynamic portion of a url that MUST match the given regex.
code/addon/Router.php: * - Not currently implemented
code/addon/Router.php: * - {?param} would specify a paramater that is optional
code/addon/Router.php: * - Not currently implemented
code/addon/Router.php: $dlm = $this->varDelim;
code/addon/Router.php: while (preg_match('/^\@([A-Z]{3,7})\./',$piece,$methodMatches)){
code/addon/Router.php: while ($piece!=($piece = preg_replace_callback('/(?<=^|['.$dlm.'])\{(\??)([a-zA-Z\_]+)\}(?=['.$dlm.']|$)/',$replace,$piece))){
code/addon/Router.php: $dlm = $this->varDelim;
code/addon/Router.php: $dlm = $this->varDelim;
code/addon/Redirect.php: $this->methods['goto'] = [$this, 'goto'];
code/addon/Redirect.php: $this->methods['gotoSetMessage'] = [$this, 'gotoSetMessage'];
code/addon/Redirect.php: $this->methods['gotoWithMessage'] = [$this, 'gotoWithMessage'];
code/addon/Redirect.php: // $this->methods['gotoWithContent'] = [$this, 'gotoWithContent'];
code/addon/Redirect.php: $this->methods['getGotoMessage'] = [$this, 'getGotoMessage'];
code/addon/Redirect.php: $this->redirectUrl = &$this->props['redirectUrl'];
code/addon/Redirect.php: // $this->props['withContent'] = $this->props['withContent'] ?? $this->withContent;
code/addon/Redirect.php: // $this->withContent = &$this->props['withContent'];
code/addon/Redirect.php: $this->props['withMessage'] = $this->props['withMessage'] ?? $this->withMessage;
code/addon/Redirect.php: $this->withMessage = &$this->props['withMessage'];
code/addon/Redirect.php: $this->props['statusCode'] = $this->props['statusCode'] ?? $this->statusCode;
code/addon/Redirect.php: $this->statusCode = &$this->props['statusCode'];
code/addon/Redirect.php: $this->props['message'] = $this->props['message'] ?? $this->message;
code/addon/Redirect.php: $this->message = &$this->props['message'];
code/addon/Redirect.php: $this->redirectUrl = $url;
code/addon/Redirect.php: $this->statusCode = $statusCode;
code/addon/Redirect.php: // $this->withContent = false;
code/addon/Redirect.php: $this->withMessage = false;
code/addon/Redirect.php: $this->go();
code/addon/Redirect.php: $this->message = $message;
code/addon/Redirect.php: $this->withMessage = true;
code/addon/Redirect.php: // $this->withContent = false;
code/addon/Redirect.php: $this->redirectUrl = $url;
code/addon/Redirect.php: // $this->withContent = false;
code/addon/Redirect.php: $this->withMessage = true;
code/addon/Redirect.php: $this->message = $message;
code/addon/Redirect.php: $this->statusCode = $statusCode;
code/addon/Redirect.php: $this->go();
code/addon/Redirect.php: // $this->redirectUrl = $url;
code/addon/Redirect.php: // $this->withContent = true;
code/addon/Redirect.php: // $this->statusCode = $statusCode;
code/addon/Redirect.php: // $this->withMessage = false;
code/addon/Redirect.php: $message = $this->cache_get_file('lia.goto.withMessage.'.$id);
code/addon/Redirect.php: $url = $this->redirectUrl;
code/addon/Redirect.php: if ($this->withMessage){
code/addon/Redirect.php: $id = uniqid().'-'.uniqid();
code/addon/Redirect.php: $message = $this->message ?? "Redirect: Unknown Message";
code/addon/Redirect.php: $this->cache_file('lia.goto.withMessage.'.$id, $message, 300);
code/addon/Redirect.php: if ($this->redirectUrl=='')return;
code/addon/Redirect.php: $url = $this->get_url();
code/addon/Redirect.php: // $this->empty_buffer();
code/addon/Redirect.php: header("Location: {$url}", true, $this->statusCode ?? 302);
code/addon/Redirect.php: // if ($this->redirectUrl=='')return;
code/addon/Redirect.php: // $response->useTheme = false;
code/addon/Redirect.php: // $response->sendContent = false;
code/addon/Redirect.php: // $id = uniqid().'-'.uniqid();
code/addon/Redirect.php: // $this->withMessage
code/addon/Redirect.php: // ? $this->message
code/addon/Redirect.php: // : ($this->withContent ? $response->content : false)
code/addon/Redirect.php: // $url = $this->redirectUrl;
code/addon/Redirect.php: // $this->lia->cacheFile('lia.Redirect.withMessage.'.$id, $message, 20);
code/addon/Redirect.php: // $response->addHeader(["Location: {$url}", $this->statusCode ?? 302]);
code/addon/Redirect.php: // $this->setHeadersNow($route, $response);
code/addon/Server.php: * @note $response->useTheme must ALSO be `true` for theme to be used.
code/addon/Server.php: $this->methods['getResponse'] = [$this, 'getResponse'];
code/addon/Server.php: $this->methods['deliver'] = [$this,'deliver'];
code/addon/Server.php: $this->methods['urlWithDomain'] = [$this,'urlWithDomain'];
code/addon/Server.php: $this->bufferResponse = $this->props['bufferResponse'] ?? $this->bufferResponse;
code/addon/Server.php: $this->props['bufferResponse'] = &$this->bufferResponse;
code/addon/Server.php: $this->useTheme = $this->props['useTheme'] ?? $this->useTheme;
code/addon/Server.php: $this->props['useTheme'] = &$this->useTheme;
code/addon/Server.php: return $this->protocol().'://'.$_SERVER['HTTP_HOST'].$relativeUrl;
code/addon/Server.php: $this->call_hook('ServerStart');
code/addon/Server.php: $this->call_hook('PreAllPackagesReady');
code/addon/Server.php: $this->call_hook('AllPackagesReady');
code/addon/Server.php: $url = $request->url();
code/addon/Server.php: $this->call_hook('RequestStarted', $request, $response);
code/addon/Server.php: $routeList = $this->route($request);
code/addon/Server.php: $this->call_hook('RoutesFound', $routeList);
code/addon/Server.php: $route = $this->getDistinctRoute($routeList);
code/addon/Server.php: $this->try_redirect_to_corrected_url($url, $method);
code/addon/Server.php: $this->call_hook('RoutesFiltered', $route);
code/addon/Server.php: $response->useTheme = true;
code/addon/Server.php: $accidental_output = $this->process_route($route, $response);
code/addon/Server.php: $this->call_hook('RouteResolved',$route,$response);
code/addon/Server.php: $this->apply_theme($route, $response);
code/addon/Server.php: $this->call_hook('ResponseReady', $response);
code/addon/Server.php: * Applies the theme (if response->useTheme & server->useTheme are true)
code/addon/Server.php: if ($response->useTheme && $this->useTheme){
code/addon/Server.php: $themeView = $this->view('theme', ['response'=>$response, 'content'=>$response->content]);
code/addon/Server.php: $this->lia->call_hook('ThemeLoaded',$themeView);
code/addon/Server.php: $response->content = ''.$themeView;
code/addon/Server.php: $target = $route->target();
code/addon/Server.php: if ($route->isCallable()){
code/addon/Server.php: $response->useTheme = true;
code/addon/Server.php: // $response->content = ob_get_clean();
code/addon/Server.php: // $response->addHeader('Cache-Control: no-cache', false);
code/addon/Server.php: } else if ($route->fileExt()=='php'){
code/addon/Server.php: $response->useTheme = true;
code/addon/Server.php: $this->requirePhpFileRoute($route,$response);
code/addon/Server.php: // $response->addHeader('Cache-Control: no-cache', false);
code/addon/Server.php: } else if ($route->isFile()){
code/addon/Server.php: $response->useTheme = false;
code/addon/Server.php: $staticFile = new \Lia\Utility\StaticFile($route->target());
code/addon/Server.php: $response->addHeaders($staticFile->getHeaders());
code/addon/Server.php: if ($staticFile->userHasFileCached){
code/addon/Server.php: $response->sendContent = false;
code/addon/Server.php: $response->content = file_get_contents($route->target());
code/addon/Server.php: * @warning executes header() if corrected_url route is found, or if the url was not already lower-case
code/addon/Server.php: if (substr($url,-1)!='/'){
code/addon/Server.php: $routeList = $this->route($request);
code/addon/Server.php: header('Cache-Control: no-cache');
code/addon/Server.php: header('Cache-Control: no-cache');
code/addon/Server.php: $response->sendHeaders();
code/addon/Server.php: if ($response->sendContent){
code/addon/Server.php: echo $response->content;
code/addon/Server.php: $this->lia->call_hook('ResponseSent',$response);
code/addon/Server.php: // $this->closeConnection();
code/addon/Server.php: $this->lia->call_hook('RequestFinished', $response);
code/addon/Server.php: $response = $this->getResponse($url,$method);
code/addon/Server.php: $this->send_response($response);
code/addon/Server.php: if ($this->bufferResponse){
code/addon/Server.php: $lia = $this->lia;
code/addon/Server.php: $package = $route->package();
code/addon/Server.php: extract($route->paramaters(), EXTR_PREFIX_SAME, 'route');
code/addon/Server.php: extract($package->public_file_params);
code/addon/Server.php: // extract($lia->getGlobalParamaters(),EXTR_PREFIX_SAME,'global');
code/addon/Server.php: require($route->target());
code/addon/Server.php: $response->content = ob_get_clean();
code/addon/Server.php: $l1 = strlen($a->placeholderPattern());
code/addon/Server.php: $l2 = strlen($b->placeholderPattern());
code/addon/Server.php: else if ($l1>$l2)return -1;
code/addon/View.php: * @todo enable fallback-namespacing when default namespace (null) is not set. So you can add view `lia:theme`, then load view `theme` and get `lia:theme`
code/addon/View.php: * @warning conflictMode has a weird interaction with null-namespace views. If you add `ns:viewname`, then try to add `viewname` a conflict will now be generated because `ns:viewname` sets null-namespace `viewname`.
code/addon/View.php: $lia = $this->lia;
code/addon/View.php: $lia->methods['view'] = [$this, 'view'];
code/addon/View.php: $lia->methods['addView'] = [$this, 'addView'];
code/addon/View.php: $lia->methods['addViewCallable'] = [$this, 'addViewCallable'];
code/addon/View.php: $lia = $this->lia;
code/addon/View.php: $viewName = substr($f,1,-4);
code/addon/View.php: $this->package[$viewName] = $package;
code/addon/View.php: $viewName = $package->name.':'.$viewName;
code/addon/View.php: $this->addView($viewName,$dir);
code/addon/View.php: $this->views[$namespace][$name] = $view;
code/addon/View.php: $this->views[null][$name] = $view;
code/addon/View.php: // $this->views[null][$name] = $this->views[null][$name] ?? $view;
code/addon/View.php: $this->views[$namespace][$name] = $view;
code/addon/View.php: $this->views[null][$name] = $view;
code/addon/View.php: // $this->views[null][$name] = $this->views[null][$name] ?? $view;
code/addon/View.php: $this->views[$namespace][$name] = $view;
code/addon/View.php: $this->views[null][$name] = $view;
code/addon/View.php: // $this->views[null][$name] = $this->views[null][$name] ?? $view;
code/addon/View.php: $args['lia'] = $args['lia'] ?? $this->_lia;
code/addon/View.php: foreach ($this->globalArgs as $key=>$value){
code/addon/View.php: // if (!isset($this->views[$namespace][$name])){
code/addon/View.php: if (isset($this->package[$name]))$args['package'] = $this->package[$name];
code/addon/View.php: $view = $this->views[$namespace][$name];
code/addon/View.php: return $this->$method($view, $args);
code/addon/View.php: if (file_exists($path.'.js'))$this->addResourceFile($path.'.js');
code/addon/View.php: if (file_exists($path.'.css'))$this->addResourceFile($path.'.css');
code/addon/View.php: $this->addFiles($path);
code/addon/View.php: if (substr($file,-4)=='.css'||substr($file,-3)=='.js'){
code/addon/View.php: $this->addResourceFile($dir.'/'.$file);
code/cache/lia.resource.cssFileMap.file:{"\/home\/reed\/data\/owner\/Reed\/projects\/php\/Liaison\/test\/ServerMinimal\/view\/ArticlePreview.css":"lia-resource.625075685535c.min.css","\/home\/reed\/data\/owner\/Reed\/projects\/php\/Liaison\/code\/view\/theme.css":"lia-resource.6251d674442b6.min.css","\/home\/reed\/data\/owner\/Reed\/projects\/sites\/lovedecatur.com\/Apps\/Site\/view\/theme.css--\/home\/reed\/data\/owner\/Reed\/projects\/sites\/lovedecatur.com\/Apps\/Site\/view\/theme\/Articles.css--\/home\/reed\/data\/owner\/Reed\/projects\/sites\/lovedecatur.com\/Apps\/Site\/view\/theme\/Tables.css--\/home\/reed\/data\/owner\/Reed\/projects\/sites\/lovedecatur.com\/Apps\/Site\/view\/theme\/details.css--\/home\/reed\/data\/owner\/Reed\/projects\/sites\/lovedecatur.com\/Apps\/Site\/view\/theme\/elements.css--\/home\/reed\/data\/owner\/Reed\/projects\/sites\/lovedecatur.com\/Apps\/Site\/view\/theme\/flexGrid.css--\/home\/reed\/data\/owner\/Reed\/projects\/sites\/lovedecatur.com\/Apps\/Site\/view\/theme\/site.css--\/home\/reed\/data\/owner\/Reed\/projects\/sites\/lovedecatur.com\/Apps\/Site\/view\/theme\/theme.css--\/home\/reed\/data\/owner\/Reed\/projects\/sites\/lovedecatur.com\/Apps\/Site\/view\/theme\/twoColumns.css":"lia-resource.625495fa8437e.min.css"}
code/cache/lia-resource.6251d674442b6.min.css.file: flex-direction:column;
code/cache/lia-resource.6251d674442b6.min.css.file: background: var(--cHead);
code/cache/lia-resource.6251d674442b6.min.css.file: background: var(--cMain);
code/cache/lia-resource.6251d674442b6.min.css.file: background: var(--cFoot);
code/cache/lia-resource.625495fa8437e.min.css.file:.heading-permalink {
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration: none;
code/cache/lia-resource.625495fa8437e.min.css.file: --cBg: hsl(0,0%, 95%);
code/cache/lia-resource.625495fa8437e.min.css.file: --cHead: hsl(0,50%,50%);
code/cache/lia-resource.625495fa8437e.min.css.file: --cMain: hsl(0,0%,98%);
code/cache/lia-resource.625495fa8437e.min.css.file: --cFoot: hsl(0,0%,40%);
code/cache/lia-resource.625495fa8437e.min.css.file: flex-direction:column;
code/cache/lia-resource.625495fa8437e.min.css.file: background: var(--cBg);
code/cache/lia-resource.625495fa8437e.min.css.file: background: var(--cHead);
code/cache/lia-resource.625495fa8437e.min.css.file: background: var(--cMain);
code/cache/lia-resource.625495fa8437e.min.css.file: background: var(--cFoot);
code/cache/lia-resource.625495fa8437e.min.css.file:.x-overflow-scroller {
code/cache/lia-resource.625495fa8437e.min.css.file: max-width:100%;
code/cache/lia-resource.625495fa8437e.min.css.file: overflow-x:scroll;
code/cache/lia-resource.625495fa8437e.min.css.file: border-collapse: collapse;
code/cache/lia-resource.625495fa8437e.min.css.file: max-width: 100%;
code/cache/lia-resource.625495fa8437e.min.css.file: overflow-x: scroll;
code/cache/lia-resource.625495fa8437e.min.css.file: border-collapse:collapse;
code/cache/lia-resource.625495fa8437e.min.css.file: border-spacing: 0;
code/cache/lia-resource.625495fa8437e.min.css.file:.data_table td .y-overflow-scroller {
code/cache/lia-resource.625495fa8437e.min.css.file: max-height: 4em;
code/cache/lia-resource.625495fa8437e.min.css.file: overflow-y:scroll;
code/cache/lia-resource.625495fa8437e.min.css.file: font-size:x-large;
code/cache/lia-resource.625495fa8437e.min.css.file: font-weight:400;
code/cache/lia-resource.625495fa8437e.min.css.file: color:var(--color_link_primary);
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration-color:var(--color_link_primary);
code/cache/lia-resource.625495fa8437e.min.css.file: color:var(--color_link_primary_visited);
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration-color:var(--color_link_primary_visited);
code/cache/lia-resource.625495fa8437e.min.css.file: color:var(--color_link_primary_active);
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration-color:var(--color_link_primary_active);
code/cache/lia-resource.625495fa8437e.min.css.file: color:var(--color_link_seconary);
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration-color:var(--color_link_secondary);
code/cache/lia-resource.625495fa8437e.min.css.file: color:var(--color_link_secondary_visited);
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration-color:var(--color_link_secondary_visited);
code/cache/lia-resource.625495fa8437e.min.css.file: color:var(--color_link_secondary_active);
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration-color:var(--color_link_secondary_active);
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration:underline;
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration: none;
code/cache/lia-resource.625495fa8437e.min.css.file: font-size:var(--_legend_size);
code/cache/lia-resource.625495fa8437e.min.css.file: color:var(--color_link_primary);
code/cache/lia-resource.625495fa8437e.min.css.file: display:inline-block;
code/cache/lia-resource.625495fa8437e.min.css.file: max-width:100%;
code/cache/lia-resource.625495fa8437e.min.css.file: padding-left:1.0em;
code/cache/lia-resource.625495fa8437e.min.css.file: padding-left:1.0em;
code/cache/lia-resource.625495fa8437e.min.css.file: max-width: 100%;
code/cache/lia-resource.625495fa8437e.min.css.file: background: var(--color_off_white_bright);
code/cache/lia-resource.625495fa8437e.min.css.file: flex-direction: column;
code/cache/lia-resource.625495fa8437e.min.css.file: flex-flow: wrap row;
code/cache/lia-resource.625495fa8437e.min.css.file: list-style-type: none;
code/cache/lia-resource.625495fa8437e.min.css.file: justify-content:center;
code/cache/lia-resource.625495fa8437e.min.css.file: min-width:20ch;
code/cache/lia-resource.625495fa8437e.min.css.file: max-width:40ch;
code/cache/lia-resource.625495fa8437e.min.css.file: flex-wrap:wrap;
code/cache/lia-resource.625495fa8437e.min.css.file: flex-direction:column;
code/cache/lia-resource.625495fa8437e.min.css.file: align-items:center;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_primary: darkred;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_primary_light: #ef3d47;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_primary_dark: darkred;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_contrast: white;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_contrast_bright: darkred;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_contrast_dark:#200070;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_secondary: #111;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_secondary_light: #222;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_secondary_dark: #111;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_primary_text: black;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_text_one: yellow;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_menu_background: #222;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_off_white: #F8F8F8;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_off_white_bright: #FEFEFE;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_primary_tint: #50009211;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_background_content: #FEFEFE;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_background_footer: lightgrey;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_link_primary: rgb(94, 12, 12);
code/cache/lia-resource.625495fa8437e.min.css.file: --color_link_primary_active: rgb(21, 62, 151);
code/cache/lia-resource.625495fa8437e.min.css.file: --color_link_primary_visited: var(--color_contrast_bright);
code/cache/lia-resource.625495fa8437e.min.css.file: --color_link_secondary: blue;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_link_secondary_active:pink;
code/cache/lia-resource.625495fa8437e.min.css.file: --color_link_secondary_visited:green;
code/cache/lia-resource.625495fa8437e.min.css.file: --height_header_item: 1.5rem;
code/cache/lia-resource.625495fa8437e.min.css.file: --padding_main: 0.0rem;
code/cache/lia-resource.625495fa8437e.min.css.file: --padding_main_small: 0.0rem;
code/cache/lia-resource.625495fa8437e.min.css.file: --padding_content:1.5rem 1.0rem 1.5rem 1.0rem;
code/cache/lia-resource.625495fa8437e.min.css.file: --padding_content: 0;
code/cache/lia-resource.625495fa8437e.min.css.file: --padding_content_side: 1.5rem;
code/cache/lia-resource.625495fa8437e.min.css.file: --padding_content_first_child: 1.5rem 1.0rem 1.5rem 1.0rem;
code/cache/lia-resource.625495fa8437e.min.css.file: --padding_content_first_child_vertical: 1.5rem;
code/cache/lia-resource.625495fa8437e.min.css.file: --padding_content_first_child_horizontal: 1.0rem;
code/cache/lia-resource.625495fa8437e.min.css.file: --padding_content_item: 0.5rem 1.5rem 0.5rem 1.5rem;
code/cache/lia-resource.625495fa8437e.min.css.file: --_legend_size: 2rem;
code/cache/lia-resource.625495fa8437e.min.css.file: background: var(--color_off_white);
code/cache/lia-resource.625495fa8437e.min.css.file: min-height:0px;
code/cache/lia-resource.625495fa8437e.min.css.file: justify-content:center;
code/cache/lia-resource.625495fa8437e.min.css.file: align-items:center;
code/cache/lia-resource.625495fa8437e.min.css.file: background:var(--color_background_footer);
code/cache/lia-resource.625495fa8437e.min.css.file: flex-direction:column;
code/cache/lia-resource.625495fa8437e.min.css.file: border-top: 1px solid black;
code/cache/lia-resource.625495fa8437e.min.css.file: color:var(--color_primary_text);
code/cache/lia-resource.625495fa8437e.min.css.file: flex-direction:row;
code/cache/lia-resource.625495fa8437e.min.css.file: justify-content:space-between;
code/cache/lia-resource.625495fa8437e.min.css.file: max-width:1024px;
code/cache/lia-resource.625495fa8437e.min.css.file: list-style-type:none;
code/cache/lia-resource.625495fa8437e.min.css.file: padding-left:8px;
code/cache/lia-resource.625495fa8437e.min.css.file: margin-top:0;
code/cache/lia-resource.625495fa8437e.min.css.file: padding-top:0;
code/cache/lia-resource.625495fa8437e.min.css.file: color:var(--color_link_primary_visited);
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration: none;
code/cache/lia-resource.625495fa8437e.min.css.file: margin-left:-0.5rem;
code/cache/lia-resource.625495fa8437e.min.css.file: content: "-";
code/cache/lia-resource.625495fa8437e.min.css.file: margin-right:0.5rem;
code/cache/lia-resource.625495fa8437e.min.css.file: color:var(--color_link_primary);
code/cache/lia-resource.625495fa8437e.min.css.file: display:inline-block;
code/cache/lia-resource.625495fa8437e.min.css.file: background: var(--color_primary);
code/cache/lia-resource.625495fa8437e.min.css.file: border-bottom: 1px solid black;
code/cache/lia-resource.625495fa8437e.min.css.file: box-shadow: inset 0px -6px 12px -4px var(--color_contrast);
code/cache/lia-resource.625495fa8437e.min.css.file: justify-content:left;
code/cache/lia-resource.625495fa8437e.min.css.file: flex-flow: row wrap;
code/cache/lia-resource.625495fa8437e.min.css.file: vertical-align:middle;
code/cache/lia-resource.625495fa8437e.min.css.file: justify-content:left;
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration: none;
code/cache/lia-resource.625495fa8437e.min.css.file: font-weight: bold;
code/cache/lia-resource.625495fa8437e.min.css.file: font-size: 1.5rem;
code/cache/lia-resource.625495fa8437e.min.css.file: text-overflow: ellipsis;
code/cache/lia-resource.625495fa8437e.min.css.file: color: var(--color_text_one);
code/cache/lia-resource.625495fa8437e.min.css.file: color:var(--color_primary_dark);
code/cache/lia-resource.625495fa8437e.min.css.file: display:table-cell;
code/cache/lia-resource.625495fa8437e.min.css.file: vertical-align: middle;
code/cache/lia-resource.625495fa8437e.min.css.file: align-self:flex-center;
code/cache/lia-resource.625495fa8437e.min.css.file: text-align:center;
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration: none;
code/cache/lia-resource.625495fa8437e.min.css.file: font-size: 17px;
code/cache/lia-resource.625495fa8437e.min.css.file: border-right: 1px solid rgba(0,0,0,0.7);
code/cache/lia-resource.625495fa8437e.min.css.file: border-bottom: 1px solid rgba(0,0,0,0.7);
code/cache/lia-resource.625495fa8437e.min.css.file: border-top: 1px solid rgba(0,0,0,0.2);
code/cache/lia-resource.625495fa8437e.min.css.file: border-left: 1px solid rgba(0,0,0,0.2);
code/cache/lia-resource.625495fa8437e.min.css.file: border-color:rgba(150,150,150,0.8);
code/cache/lia-resource.625495fa8437e.min.css.file: border-width:0 1px 0 0;
code/cache/lia-resource.625495fa8437e.min.css.file: border-top:1px solid black;
code/cache/lia-resource.625495fa8437e.min.css.file: /* color: var(--color_primary_light); */
code/cache/lia-resource.625495fa8437e.min.css.file: color: var(--color_primary);
code/cache/lia-resource.625495fa8437e.min.css.file: text-decoration: none;
code/cache/lia-resource.625495fa8437e.min.css.file: color: var(--color_secondary_light);
code/cache/lia-resource.625495fa8437e.min.css.file: font-size: 1.2rem;
code/cache/lia-resource.625495fa8437e.min.css.file: text-overflow: ellipsis;
code/cache/lia-resource.625495fa8437e.min.css.file: -webkit-user-select: none;
code/cache/lia-resource.625495fa8437e.min.css.file: -moz-user-select: none;
code/cache/lia-resource.625495fa8437e.min.css.file: -ms-user-select: none;
code/cache/lia-resource.625495fa8437e.min.css.file: user-select: none;
code/cache/lia-resource.625495fa8437e.min.css.file: -webkit-tap-highlight-color: var(--color_primary_light);
code/cache/lia-resource.625495fa8437e.min.css.file: padding: var(--padding_main);
code/cache/lia-resource.625495fa8437e.min.css.file: background: var(--color_off_white);
code/cache/lia-resource.625495fa8437e.min.css.file: border-left:1px solid var(--color_primary_dark);
code/cache/lia-resource.625495fa8437e.min.css.file: border-right:1px solid rgba(0,0,0,0.1);
code/cache/lia-resource.625495fa8437e.min.css.file: max-width:1024px;
code/cache/lia-resource.625495fa8437e.min.css.file: margin-left:auto;
code/cache/lia-resource.625495fa8437e.min.css.file: margin-right:auto;
code/cache/lia-resource.625495fa8437e.min.css.file: min-height:100%;
code/cache/lia-resource.625495fa8437e.min.css.file: background:var(--color_background_content);
code/cache/lia-resource.625495fa8437e.min.css.file: padding:var(--padding_content);
code/cache/lia-resource.625495fa8437e.min.css.file: max-width:60rem;
code/cache/lia-resource.625495fa8437e.min.css.file: margin-left:auto;
code/cache/lia-resource.625495fa8437e.min.css.file: margin-right:auto;
code/cache/lia-resource.625495fa8437e.min.css.file: border-left: 1px solid rgba(150,150,150,0.5);
code/cache/lia-resource.625495fa8437e.min.css.file: border-right: 1px solid rgba(150,150,150,0.5);
code/cache/lia-resource.625495fa8437e.min.css.file: padding:0 var(--padding_content_side);
code/cache/lia-resource.625495fa8437e.min.css.file:.contentArea .desktopWrap > *:first-child {
code/cache/lia-resource.625495fa8437e.min.css.file: padding:var(--padding_content_first_child);
code/cache/lia-resource.625495fa8437e.min.css.file: /* padding:var(--padding_content_vertical), var(--padding_content_side) !important; */
code/cache/lia-resource.625495fa8437e.min.css.file: padding:var(--padding_content_item) !important;
code/cache/lia-resource.625495fa8437e.min.css.file: background-size:cover;
code/cache/lia-resource.625495fa8437e.min.css.file: background-position: center center;
code/cache/lia-resource.625495fa8437e.min.css.file:.desktopWrap #mzIntro:first-child {
code/cache/lia-resource.625495fa8437e.min.css.file:#contentArea .desktopWrap #mzIntro:first-child img{
code/cache/lia-resource.625495fa8437e.min.css.file: margin: calc(-1 * var(--padding_content_first_child_vertical)) 0 0 calc(-1 * var(--padding_content_first_child_horizontal));
code/cache/lia-resource.625495fa8437e.min.css.file: width: calc(100% + var(--padding_content_first_child_horizontal) * 2);
code/cache/lia-resource.625495fa8437e.min.css.file: justify-content:center; */
code/cache/lia-resource.625495fa8437e.min.css.file: column-gap: 4em;
code/cache/lia-resource.625495fa8437e.min.css.file: column-rule: 1px solid #ddd;
code/cache/lia-resource.625495fa8437e.min.css.file: display:inline-block;
code/cache/lia-resource.625495fa8437e.min.css.file: min-width:50%;
composer.json: "require-dev": {
composer.json: "taeluf/code-scrawl":"v0.8.x-dev",
composer.json: "taeluf/tester": "v0.3.x-dev"
composer.json: "minimum-stability":"dev"
composer.lock: "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
composer.lock: "content-hash": "0782ae9fe8859d3150b0bdf9b98a3b89",
composer.lock: "packages-dev": [
composer.lock: "name": "taeluf/better-regex",
composer.lock: "version": "v0.4.x-dev",
composer.lock: "url": "https://gitlab.com/taeluf/php/better-regex.git",
composer.lock: "url": "https://gitlab.com/api/v4/projects/taeluf%2Fphp%2Fbetter-regex/repository/archive.zip?sha=3ee2ff3482d8903d6977fa1fd97a227f4457dc54",
composer.lock: "require-dev": {
composer.lock: "taeluf/code-scrawl": "v0.7.x-dev",
composer.lock: "taeluf/tester": "v0.3.x-dev"
composer.lock: "default-branch": true,
composer.lock: "notification-url": "https://packagist.org/downloads/",
composer.lock: "issues": "https://gitlab.com/taeluf/php/better-regex/-/issues",
composer.lock: "source": "https://gitlab.com/taeluf/php/better-regex/-/tree/v0.4"
composer.lock: "time": "2022-03-28T20:55:32+00:00"
composer.lock: "version": "v0.1.x-dev",
composer.lock: "require-dev": {
composer.lock: "taeluf/code-scrawl": "v0.5.x-dev"
composer.lock: "default-branch": true,
composer.lock: "notification-url": "https://packagist.org/downloads/",
composer.lock: "issues": "https://gitlab.com/taeluf/php/cli/-/issues",
composer.lock: "source": "https://gitlab.com/taeluf/php/cli/-/tree/v0.1"
composer.lock: "time": "2022-03-29T21:57:24+00:00"
composer.lock: "name": "taeluf/code-scrawl",
composer.lock: "version": "v0.8.x-dev",
composer.lock: "taeluf/better-regex": "v0.4.x-dev",
composer.lock: "taeluf/cli": "v0.1.x-dev",
composer.lock: "taeluf/lexer": "v0.8.x-dev"
composer.lock: "require-dev": {
composer.lock: "taeluf/tester": "v0.3.x-dev"
composer.lock: "default-branch": true,
composer.lock: "notification-url": "https://packagist.org/downloads/",
composer.lock: "description": "A documentation generation framework with some built-in extensions for exporting comments and code, and importing into markdown. ",
composer.lock: "issues": "https://gitlab.com/taeluf/php/CodeScrawl/-/issues",
composer.lock: "source": "https://gitlab.com/taeluf/php/CodeScrawl/-/tree/v0.8"
composer.lock: "time": "2022-04-12T12:28:35+00:00"
composer.lock: "version": "v0.8.x-dev",
composer.lock: "require-dev": {
composer.lock: "taeluf/tester": "v0.3.x-dev"
composer.lock: "default-branch": true,
composer.lock: "notification-url": "https://packagist.org/downloads/",
composer.lock: "issues": "https://gitlab.com/taeluf/php/lexer/-/issues",
composer.lock: "source": "https://gitlab.com/taeluf/php/lexer/-/tree/v0.8"
composer.lock: "time": "2022-03-13T19:43:56+00:00"
composer.lock: "version": "v0.3.x-dev",
composer.lock: "url": "https://gitlab.com/taeluf/php/php-tests.git",
composer.lock: "url": "https://gitlab.com/api/v4/projects/taeluf%2Fphp%2Fphp-tests/repository/archive.zip?sha=37230508f56fc3c4020536fd1f708701626dbc88",
composer.lock: "taeluf/cli": "v0.1.x-dev"
composer.lock: "require-dev": {
composer.lock: "taeluf/code-scrawl": "v0.6.x-dev"
composer.lock: "default-branch": true,
composer.lock: "notification-url": "https://packagist.org/downloads/",
composer.lock: "issues": "https://gitlab.com/taeluf/php/php-tests/-/issues",
composer.lock: "source": "https://gitlab.com/taeluf/php/php-tests/-/tree/v0.3"
composer.lock: "time": "2022-04-11T20:03:19+00:00"
composer.lock: "minimum-stability": "dev",
composer.lock: "stability-flags": {
composer.lock: "taeluf/code-scrawl": 20,
composer.lock: "prefer-stable": false,
composer.lock: "prefer-lowest": false,
composer.lock: "platform-dev": [],
composer.lock: "plugin-api-version": "2.1.0"
old/tests/Closure.php: * $closure->funcName === 'purr';
old/tests/Closure.php: * $closure->object === $cat;
old/tests/Closure.php: * $closure->class === 'Funny\\Cat'; //it prints with a single slash, but backslashes are generally better off being escaped in my experience
old/tests/Closure.php: * $closure->isStatic === false; // would be true if using ['Funny\Cat', 'purr'] instead of [$cat, 'purr']
old/tests/Closure.php: * $closure->isAnonymous === false; // would be true for function(){echo 'Kindness can be anonymous too.';}
old/tests/Closure.php: * $closure->function === null; // would be the anonymous function, if you had passed a function instead of an `[$obj, 'funcName']` callable
old/tests/Closure.php: * $closure->origCallable === [$cat, 'purr']; //just the first arg you pass to the constructor
old/tests/Closure.php: * $closure->bound === [$loudness]; // and this is the 2nd arg
old/tests/Closure.php: $aClass = $closure->class;
old/tests/Closure.php: $aObj = $closure->object;
old/tests/Closure.php: $aFuncName = $closure->funcName;
old/tests/Closure.php: $this->test('ActualClassVActualObjClass')->compare($aClass,$aObjClass)
old/tests/Closure.php: && $this->test('Class')->compare($tClass,$aClass)
old/tests/Closure.php: && $this->test('Object')->compare($tObj,$aObj)
old/tests/Closure.php: && $this->test('ObjectClass')->compare($tObjClass, $aObjClass)
old/tests/Closure.php: && $this->test('FuncName')->compare($tFuncName, $aFuncName)
old/tests/Closure.php: && $this->test('CallClosure')->compare($tCallClosure,$aCallClosure)
old/tests/Closure.php: return $this->compare(true,$closure->isStatic);
old/tests/Closure.php: return $this->compare(true,$closure->isAnonymous);
old/tests/DotNotation.php: 'Of course, though "All lives matter is a protest to my protest. What kinda shit is that!?" - Joyner Lucas in I\'m Not Racist'
old/tests/DotNotation.php: 'Of course, though "All lives matter is a protest to my protest. What kinda shit is that!?" - Joyner Lucas in I\'m Not Racist'
old/tests/DotNotation.php: && $this->compare($tArray, $aArray)
old/tests/LiaPrototype.php: $ns = 'methods-test';
old/tests/LiaPrototype.php: $lia->addMethod('xyz', function(){return 'xyz';});
old/tests/LiaPrototype.php: $lia->addMethod($ns.'.def', function(){return 'def';});
old/tests/LiaPrototype.php: $lia->addMethod($ns.'.addon.abc', function(){return 'abc';});
old/tests/LiaPrototype.php: $this->compare('xyz', $addon->_api('xyz'));
old/tests/LiaPrototype.php: $this->compare('def', $addon->_api($ns.'.def'));
old/tests/LiaPrototype.php: $this->compare('abc', $addon->_api($ns.'.addon.abc'));
old/tests/LiaPrototype.php: $this->compare('xyz', $package->_api('xyz'));
old/tests/LiaPrototype.php: $this->compare('def', $package->_api($ns.'.def'));
old/tests/LiaPrototype.php: $this->compare('abc', $package->_api($ns.'.addon.abc'));
old/tests/LiaPrototype.php: $this->compare('xyz', $lia->_api('xyz'));
old/tests/LiaPrototype.php: $this->compare('def', $lia->_api($ns.'.def'));
old/tests/LiaPrototype.php: $this->compare('abc', $lia->_api($ns.'.addon.abc'));
old/tests/LiaPrototype.php: $this->compare ('xyz', $package->_lia->xyz());
old/tests/LiaPrototype.php: $this->compare('xyz', $package->lia->xyz());
old/tests/LiaPrototype.php: $this->compare('xyz', $addon->lia->lia->xyz());
old/tests/LiaPrototype.php: $this->compare('xyz', $addon->_lia->xyz());
old/tests/LiaPrototype.php: $this->compare('def', $addon->lia->def());
old/tests/LiaPrototype.php: $ns = 'methods-test';
old/tests/LiaPrototype.php: $lia->addMethod($ns.'.addon.abc', function(){return 'abc';});
old/tests/LiaPrototype.php: $this->compare('abc', $addon->abc());
old/tests/LiaPrototype.php: $this->compare('abc',$package->methods['addon']['abc']());
old/tests/LiaPrototype.php: $this->compare('abc',$package->api('addon.abc'));
old/tests/LiaPrototype.php: $this->compare('abc',$lia->methods[$ns]['addon']['abc']());
old/tests/LiaPrototype.php: $this->compare('abc',$lia->api($ns.'.addon.abc'));
old/tests/LiaPrototype.php: $lia->addMethod($ns.'.def', function(){return 'def';});
old/tests/LiaPrototype.php: $this->compare('def',$package->def());
old/tests/LiaPrototype.php: $this->compare('def', $lia->api($ns.'.def'));
old/tests/LiaPrototype.php: $ns = 'methods-test';
old/tests/LiaPrototype.php: $addon->addMethod('abc', function(){return 'abc';});
old/tests/LiaPrototype.php: $this->compare('abc', $addon->abc());
old/tests/LiaPrototype.php: $this->compare('abc',$package->methods['addon']['abc']());
old/tests/LiaPrototype.php: $this->compare('abc',$package->api('addon.abc'));
old/tests/LiaPrototype.php: $this->compare('abc',$lia->methods[$ns]['addon']['abc']());
old/tests/LiaPrototype.php: $this->compare('abc',$lia->api($ns.'.addon.abc'));
old/tests/LiaPrototype.php: $package->addMethod('def', function(){return 'def';});
old/tests/LiaPrototype.php: $this->compare('def',$package->def());
old/tests/LiaPrototype.php: $this->compare('def', $lia->api($ns.'.def'));
old/tests/LiaPrototype.php: $ns = 'test-ns';
old/tests/LiaPrototype.php: $this->compare_raw($package->addons, ['package'=>$package, 'addon'=>$addon]);
old/tests/LiaPrototype.php: $this->compare_raw($package, $lia->addons[$ns]['package']);
old/tests/LiaPrototype.php: $this->compare_raw($addon, $lia->addons[$ns]['addon']);
old/tests/LiaPrototype.php: $this->compare_raw(
old/tests/LiaPrototype.php: $lia->addons
old/tests/LiaPrototype.php: $this->compare_raw(
old/tests/LiaPrototype.php: $lia->addons
old/tests/LiaPrototype.php: $package->set('something', 'value');
old/tests/LiaPrototype.php: $this->compare(
old/tests/LiaPrototype.php: $lia->configs,
old/tests/LiaPrototype.php: $addon->set('something', 'value');
old/tests/LiaPrototype.php: $lia->set('ns.addon.something', 'new_value');
old/tests/LiaPrototype.php: $this->compare(
old/tests/LiaPrototype.php: $lia->configs,
old/tests/LiaPrototype.php: $this->compare('new_value', $lia->configs['ns']['addon']['something']);
old/tests/LiaPrototype.php: $this->compare('new_value', $package->configs['addon']['something']);
old/tests/LiaPrototype.php: $this->compare('new_value', $addon->configs['something']);
old/tests/LiaPrototype.php: $addon->set('something', 'value');
old/tests/LiaPrototype.php: $lia->set('ns.addon.something', 'new_value');
old/tests/LiaPrototype.php: $this->compare(
old/tests/LiaPrototype.php: $lia->configs,
old/tests/LiaPrototype.php: $this->compare('new_value', $lia->get('ns.addon.something'));
old/tests/LiaPrototype.php: $this->compare('new_value', $package->get('addon.something'));
old/tests/LiaPrototype.php: $this->compare('new_value', $addon->get('something'));
old/tests/LiaPrototype.php: $addon->set('something', 'value');
old/tests/LiaPrototype.php: $this->compare(
old/tests/LiaPrototype.php: $lia->configs,
old/tests/ExceptionCatcher.php: $ns = 'catch-test';
old/tests/ExceptionCatcher.php: $lia->addMethod('xyz', function(){return 'xyz';});
old/tests/ExceptionCatcher.php: $lia->addMethod($ns.'.def', function(){return 'def';});
old/tests/ExceptionCatcher.php: $lia->addMethod($ns.'.addon.abc', function(){return 'abc';});
old/tests/ExceptionCatcher.php: $addon->xyz();
old/tests/ExceptionCatcher.php: $this->str_contains($output, 'Message: Api method `xyz` does note exist on Lia');
old/tests/ExceptionCatcher.php: $this->str_contains($output, '- File: ' . __FILE__);
old/tests/ExceptionCatcher.php: $this->str_contains($output, '- Line: '. $line);
old/tests/ExceptionCatcher.php: $this->str_contains($output, '- Function: __call');
old/code/DebugTraitTest.php: $lia = $this->bare($debug=true);
old/code/DebugTraitTest.php: $lia->mediate('two',[$this,'mediate']);
old/code/DebugTraitTest.php: $lia->mediate('two',[$this,'mediate']);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('two',[$this,'hello']);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('two',[$this,'hola']);
old/code/DebugTraitTest.php: $lia->two('Tired');
old/code/DebugTraitTest.php: $lia->mediate('three',[$this,'brokenMediate']);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('three',[$this,'hello']);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('three',[$this,'hola']);
old/code/DebugTraitTest.php: $debug = $lia->debug(\Liaison::STACK);
old/code/DebugTraitTest.php: return $this->compare($target,$actual);
old/code/DebugTraitTest.php: $lia = $this->bare($debug=true);
old/code/DebugTraitTest.php: $lia->mediate('two',[$this,'mediate']);
old/code/DebugTraitTest.php: $lia->mediate('two',[$this,'mediate']);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('two',[$this,'hello']);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('two',[$this,'hola']);
old/code/DebugTraitTest.php: $lia->two('Tired');
old/code/DebugTraitTest.php: $lia->mediate('three',[$this,'mediate']);
old/code/DebugTraitTest.php: $debug = $lia->debug(\Liaison::MEDIATORS);
old/code/DebugTraitTest.php: return $this->compare($target, $actual);
old/code/DebugTraitTest.php: $lia = $this->bare($debug=true);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('one',[$this,'hello']);
old/code/DebugTraitTest.php: $lia->removeGlobalFunction('one');
old/code/DebugTraitTest.php: $lia->one("nonexistent person");
old/code/DebugTraitTest.php: $lia->addGlobalFunction('two',[$this,'hello']);
old/code/DebugTraitTest.php: $lia->replaceGlobalFunction('two', [$this, 'hola']);
old/code/DebugTraitTest.php: $lia->two("tired person");
old/code/DebugTraitTest.php: $lia->addGlobalFunction('three',[$this,'hello']);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('six',[$this,'hello']);
old/code/DebugTraitTest.php: $debug = $lia->debug(\Liaison::FUNCTIONS);
old/code/DebugTraitTest.php: return $this->compare($target, $actual);
old/code/DebugTraitTest.php: $lia = $this->bare();
old/code/DebugTraitTest.php: $lia->mediate('one',[$this,'mediate']);
old/code/DebugTraitTest.php: $lia->mediate('two',[$this,'mediate']);
old/code/DebugTraitTest.php: $lia->mediate('three',[$this,'mediate']);
old/code/DebugTraitTest.php: $lia->mediate('four',[$this,'mediate']);
old/code/DebugTraitTest.php: $lia->mediate('five',[$this,'mediate']);
old/code/DebugTraitTest.php: $lia->mediate('six',[$this,'mediate']);
old/code/DebugTraitTest.php: $actual = $lia->inspect(\Liaison::MEDIATORS);
old/code/DebugTraitTest.php: return $this->compare($target,$actual);
old/code/DebugTraitTest.php: $lia = $this->bare();
old/code/DebugTraitTest.php: $lia->addGlobalFunction('one',[$this,'hello']);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('two',[$this,'hello']);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('three',[$this,'hello']);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('four',[$this,'hello']);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('five',[$this,'hello']);
old/code/DebugTraitTest.php: $lia->addGlobalFunction('six',[$this,'hello']);
old/code/DebugTraitTest.php: $actual = $lia->inspect(\Liaison::FUNCTIONS);
old/code/DebugTraitTest.php: return $this->compare($target,$actual);
old/code/DebugTraitTest.php: $lia = $this->bare();
old/code/DebugTraitTest.php: $inspectables = $lia->inspect();
old/code/DebugTraitTest.php: $constants = (new \ReflectionClass(\Liaison::class))->getConstants();
old/code/DebugTraitTest.php: return $this->compare($items,$constants);
old/code/FiltersTrait.php: * - declare and document more filters (Should I document them here or in the place where they're declared? Yes.)
old/code/FiltersTrait.php: * - Document examples
old/code/FiltersTrait.php: * To execute the filter do `$filteredItems = $lia->filter($filterName, array $itemsToFilter, ...$extraParamaters);`
old/code/FiltersTrait.php: $filters = $this->filters[$name] ?? null;
old/code/FiltersTrait.php: ($this->filterSorters[$name] ?? false)
old/code/FiltersTrait.php: * Your filter function can accept bound arguments prior to the filterable array of items. See the [Filters Test](8-build/test/Filters.php) for a full example.
old/code/FiltersTrait.php: * $lia->addFilter(Router.routes, [$yourObject, 'removeDynamicRoutes'], $priorityBaseUrl);
old/code/FiltersTrait.php: * if ($url does-not-start-with $priorityBaseUrl)return $routes; //We will only filter for '/blog/' urls
old/code/FiltersTrait.php: * if ($r is-a-dynamic-route)continue;
old/code/FiltersTrait.php: $this->filters[$name][] = ['callable'=>$callable,'bound'=>$boundArgs];
old/code/FiltersTrait.php: * - The $filterObjects will be an array of `\Lia\Utility\FancyClosure` objects
old/code/FiltersTrait.php: * And you add the filter with `$lia->sortFilter($name, $callback, ...$boundArgs)`
old/code/FiltersTrait.php: * See the [Filters Test](8-build/test/Filters.php) for an example.
old/code/FiltersTrait.php: $sorters = $this->filterSorters;
old/code/FiltersTrait.php: $this->filterSorters[$name] = ['callable'=>$callable, 'bound'=>$boundArgs];
old/code/FiltersTraitTest.php: $lia->addFilter('Test.Filter.routes', [$this, 'removeFirstRoute'], $catName, $pref);
old/code/FiltersTraitTest.php: $lia->sortFilter('Test.Filter.routes', [$this, 'sortRouteFilters'], $pref);
old/code/FiltersTraitTest.php: $lia->addFilter('Test.Filter.routes', [$this, 'filterRoutes'], $randomNumber);
old/code/FiltersTraitTest.php: $aRoutes = $lia->filter('Test.Filter.routes', ['route1', 'route2', 'route3'], $url);
old/code/FiltersTraitTest.php: return $this->test('FinalCompare')->compare($tRoutes, $aRoutes);
old/code/FiltersTraitTest.php: $this->test('FilterRoutes')->compare(['route2','route3'],$routes);
old/code/FiltersTraitTest.php: $this->test('RemoveFirstRoute')->compare(['route1','route2','route3'], $routes);
old/code/FiltersTraitTest.php: if ($a->funcName=='removeFirstRoute')return -1;
old/code/FiltersTraitTest.php: $this->test('SortFilters')->compare(['removeFirstRoute','filterRoutes'],[$routeFilters[0]->funcName,$routeFilters[1]->funcName]);
old/code/RouteStuff.php: &&strtolower(substr($url,-(strlen($hiddenExt))))==strtolower($hiddenExt)){
old/code/RouteStuff.php: &&substr($url,-1)!=='/'){
old/code/RouteStuff.php: while (substr($url,-1)==='/')
old/code/RouteStuff.php: $url = substr($url,0,-1);
old/code/DebugTrait.php: * - Add `$lia->enableDebugging()` if I think it's a good idea.
old/code/DebugTrait.php: * - make `debug` a read-only public property
old/code/DebugTrait.php: * - consider just returning when debug is disabled, instead of throwing.
old/code/DebugTrait.php: * - Document buffering the stack
old/code/DebugTrait.php: * - Document examples of debugging
old/code/DebugTrait.php: * - Document using the debugger inside an extensions, with examples
old/code/DebugTrait.php: * - Review the documentation for accuracy
old/code/DebugTrait.php: return $this->debug;
old/code/DebugTrait.php: if (!$this->debug){
old/code/DebugTrait.php: $this->buffers[] = 0;
old/code/DebugTrait.php: $this->isBuffering = true;
old/code/DebugTrait.php: if (!$this->debug){
old/code/DebugTrait.php: $lastBufferCount = array_pop($this->buffers);
old/code/DebugTrait.php: if (count($this->buffers)==0){
old/code/DebugTrait.php: $this->isBuffering = false;
old/code/DebugTrait.php: while ($lastBufferCount--){
old/code/DebugTrait.php: $bufferedItems[] = array_pop($this->stack[static::STACK]);
old/code/DebugTrait.php: $topBuffer = array_pop($this->buffers);
old/code/DebugTrait.php: $this->buffers[] = $topBuffer;
old/code/DebugTrait.php: if (!$this->debug){
old/code/DebugTrait.php: if (!isset($this->stack[$group])){
old/code/DebugTrait.php: $stack = $this->stack[static::STACK];
old/code/DebugTrait.php: * To add a debug item to the stack, if `$lia->debug` is true, call `$lia->addDebug(string $debugGroup, string $action, array $extraArgs)`.
old/code/DebugTrait.php: * if ($this->debug){
old/code/DebugTrait.php: * $this->addDebug(\Liaison::FUNCTIONS, 'register', ['function'=>$functionName]);
old/code/DebugTrait.php: if (!$this->debug){
old/code/DebugTrait.php: if (!isset($this->stack[$group])||$group===static::STACK){
old/code/DebugTrait.php: if ($this->isBuffering){
old/code/DebugTrait.php: $this->debug_buffer_increment();
old/code/DebugTrait.php: $this->stack[static::STACK][] =
old/code/DebugTrait.php: * To find out what all has been registered to liaison, call `$lia->inspect()`. With no paramaters (or an invalid paramater), you'll receive a list of items that can be inspect.
old/code/DebugTrait.php: * Then call `$lia->inspect(\Liaison::THE_ITEM)` to inspect the specific thing you're interested in, such as FUNCTIONS, MEDIATORS, CONFIG, etc.
old/code/DebugTrait.php: $items = array_keys($this->functions);
old/code/DebugTrait.php: $items = array_keys($this->mediators);
old/code/DebugTrait.php: foreach ($this->stack[\Liaison::STACK] as $item){
old/code/DebugTrait.php: $items = (new \ReflectionClass(\Liaison::class))->getConstants();
old/code/DotNotation.php: if ($i==($c-1))$flux[$part] = $value;
old/code/DotNotation.php:// if ($i==($c-1))$flux[$part] = $value;
old/code/FancyClosure.php: $this->origCallable = $callable;
old/code/FancyClosure.php: $this->bound = $boundParamaters;
old/code/FancyClosure.php: $this->funcName = $callable[1];
old/code/FancyClosure.php: $this->object = $src;
old/code/FancyClosure.php: $this->class = get_class($src);
old/code/FancyClosure.php: $this->class = $src;
old/code/FancyClosure.php: $this->isStatic = true;
old/code/FancyClosure.php: $this->funcName = $callable;
old/code/FancyClosure.php: $this->function = $callable;
old/code/FancyClosure.php: $this->function = $callable;
old/code/FancyClosure.php: $this->isAnonymous = true;
old/code/FancyClosure.php: $bound = $this->bound;
old/code/FancyClosure.php: $callable = $this->origCallable;
old/code/Namespace.php: * Check if the fully-qualified-name is set
old/code/GlobalParam.php: $lia = $this->lia;
old/code/GlobalParam.php: $lia->addApi('lia:globalparams.put',[$this,'addParamater']);
old/code/GlobalParam.php: $lia->addApiMethod('lia:globalparams.put', 'addGlobalParamater');
old/code/GlobalParam.php: $lia->addApi('lia:globalparams.getAll',[$this,'getParamaters']);
old/code/GlobalParam.php: $lia->addApiMethod('lia:globalparams.getAll', 'getGlobalParamaters');
old/code/GlobalParam.php: $this->globalArgs[$name] = $value;
old/code/GlobalParam.php: return $this->globalArgs;
old/code/PackageList.php: $lia = $this->lia;
old/code/PackageList.php: $lia->addApi('lia:package.getCompo', [$this,'compo']);
old/code/PackageList.php: $lia->addApiMethod('lia:package.getCompo', 'compo');
old/code/PackageList.php: $lia->addApi('lia:package.add',[$this,'addPackage']);
old/code/PackageList.php: $lia->addApiMethod('lia:package.add', 'addPackage');
old/code/PackageList.php: $lia->addApi('lia:package.get',[$this,'getPackage']);
old/code/PackageList.php: $lia->addApiMethod('lia:package.get', 'getPackage');
old/code/PackageList.php: // $lia->addApi('lia:package.get_all',[$this,'getPackages']);
old/code/PackageList.php: // $lia->addApiMethod('lia:package.get_all', 'getPackages');
old/code/PackageList.php: $this->packages[$namespace] = $package;
old/code/PackageList.php: // return $this->packages;
old/code/PackageList.php: $package = $this->packages[$name] ?? null;
old/code/PackageList.php: * @param $name `namespace:ComponentClassName` <- `namespace:` is optional. `ComponentClassName` does NOT include the class's namespace
old/code/PackageList.php: // var_dump(array_keys($this->packages));
old/code/PackageList.php: foreach ($this->packages as $name=>$package){
old/code/PackageList.php: $compo = $package->compo($compoName);
old/code/PackageList.php: } else if (count($this->packages)==0){
old/code/PackageList.php: throw new \Lia\Exception("Multiple compos were returned for '${fqn}'. Try providing a namespace like \$lia->compo('namespace:componame')");
old/code/BackwardCompat/LiaBC.php: * A very hacky backward-compatibility class for Liaison
old/code/BackwardCompat/LiaBC.php: $this->addApi('lia:config.get', [$this, 'get']);
old/code/BackwardCompat/LiaBC.php: $this->addApi('lia:config.default', [$this, 'default']);
old/code/BackwardCompat/LiaBC.php: $this->addApi('lia:config.set', [$this, 'set']);
old/code/BackwardCompat/LiaBC.php: $this->addApi('lia:config.append', [$this, 'append']);
old/code/BackwardCompat/LiaBC.php: $this->bc_prefix_callables[$prefix] = $callable;
old/code/BackwardCompat/LiaBC.php: $this->addApiPrefix($callable, $prefix);
old/code/BackwardCompat/LiaBC.php: return $this->prefixes;
old/code/BackwardCompat/LiaBC.php: // var_dump(array_keys($this->methods['lia']['config']));
old/code/BackwardCompat/LiaBC.php: $methods = &$this->methods;
old/code/BackwardCompat/LiaBC.php: $this->addMethod($name, $callable);
old/code/BackwardCompat/LiaBC.php: if (isset($this->bc_api_map[$name])){
old/code/BackwardCompat/LiaBC.php: if (isset($this->bc_api_mediators[$name])){
old/code/BackwardCompat/LiaBC.php: $mediator = $this->bc_api_mediators[$name];
old/code/BackwardCompat/LiaBC.php: $callable = $mediator($name, $this->bc_api_map[$name], $callable);
old/code/BackwardCompat/LiaBC.php: $this->addMethod($this->bc_api_map[$name], $callable);
old/code/BackwardCompat/LiaBC.php: } else if (isset($this->bc_api_map_callables[$name])
old/code/BackwardCompat/LiaBC.php: && !isset($this->bc_api_mediators[$name])){
old/code/BackwardCompat/LiaBC.php: $this->bc_api_map_callables[$name] = $callable;
old/code/BackwardCompat/LiaBC.php: $methods = &$this->methods;
old/code/BackwardCompat/LiaBC.php: // echo "\n\n---- addApimethod ---\n\n";
old/code/BackwardCompat/LiaBC.php: if (isset($this->bc_api_map[$api])){
old/code/BackwardCompat/LiaBC.php: // var_dump($this->bc_api_map);
old/code/BackwardCompat/LiaBC.php: $this->addMethod($this->bc_api_map[$api], $methods);
old/code/BackwardCompat/LiaBC.php: $this->addMethod($method_name, $methods);
old/code/BackwardCompat/LiaBC.php: $this->bc_api_map[$api] = $method_name;
old/code/BackwardCompat/LiaBC.php: unset($this->bc_api_map_callables[$api_name]);
old/code/BackwardCompat/LiaBC.php: // unset($this->bc_api_map[$api_name]);
old/code/BackwardCompat/LiaBC.php: $this->bc_api_mediators[$api] = $callable;
old/code/BackwardCompat/ScannerTrait.php: $lia = $this->lia;
old/code/BackwardCompat/ScannerTrait.php: $prefixes = $lia->getApiPrefixes();
old/code/BackwardCompat/ScannerTrait.php: $prefixes = $this->getPrefixes();
old/code/BackwardCompat/ScannerTrait.php: // echo "\n\n-------\n\n";
old/code/BackwardCompat/ScannerTrait.php: $this->lia->api($api, $cleanName, [$this, $methodName]);
old/2021-docsrc/.old/AllInOneComponent.src.md:- Views
old/2021-docsrc/.old/AllInOneComponent.src.md: - Page (view the question & all of it's answers)
old/2021-docsrc/.old/AllInOneComponent.src.md: - Compose (Create/Edit a question)
old/2021-docsrc/.old/AllInOneComponent.src.md: - List (To show multiple questions on an 'Office' or 'Candi' page)
old/2021-docsrc/.old/AllInOneComponent.src.md: - or does this go in Office?
old/2021-docsrc/.old/AllInOneComponent.src.md: - ListItem (that which is shown in the list)
old/2021-docsrc/.old/AllInOneComponent.src.md:- RDBModel
old/2021-docsrc/.old/AllInOneComponent.src.md:- Schema (defined by Views/Compose)
old/2021-docsrc/.old/AllInOneComponent.src.md:- Routes
old/2021-docsrc/.old/AllInOneComponent.src.md:- Backed-up-db (would this go in the component?)
old/2021-docsrc/.old/AllInOneComponent.src.md:- PHP helper code, as needed
old/2021-docsrc/.old/AllInOneComponent.src.md:- view
old/2021-docsrc/.old/AllInOneComponent.src.md:- class
old/2021-docsrc/.old/AllInOneComponent.src.md:The routes would be set via the public-dir. The `submit` script would become '$this->component('Question')->submit($_POST);`
old/2021-docsrc/.old/AllInOneComponent.src.md:2) How do I tell Liaison to deliver the `Compose` view at `/question/(question-slug:question-id)?/(\?office_id=office-id)?`
old/2021-docsrc/.old/AllInOneComponent.src.md:3) How do I tell Liaison (& other parts of the component) that the submit-url is `/question/submit/`?
old/2021-docsrc/.old/AllInOneComponent.src.md:4) How do I specify a base-url for the compoment?
old/2021-docsrc/.old/AllInOneComponent.src.md: * - FILE_CHAR URL_CHAR USE
old/2021-docsrc/.old/AllInOneComponent.src.md: * - . /
old/2021-docsrc/.old/AllInOneComponent.src.md: * - @ @POST, @GET... specify valid request types
old/2021-docsrc/.old/AllInOneComponent.src.md: * - [] OPTIONAL url paramater. EACH [\_a-zA-Z]+ becomes same-name PHP variable. [^\_a-zA-Z]+ uses standard character-substitution (like `.` replaced with `/`)
old/2021-docsrc/.old/AllInOneComponent.src.md: * - () REQUIRED url paramater. Otherwise SAME AS `[]`
old/2021-docsrc/.old/AllInOneComponent.src.md: Example url: /city-council/mayor/
old/2021-docsrc/.old/AllInOneComponent.src.md: a) $office = city-council && $position = mayor
old/2021-docsrc/.old/AllInOneComponent.src.md: b) OR $officePosition = city-council/mayor
old/2021-docsrc/.old/AllInOneComponent.src.md: - `Public/` - Place files in the public directory with the naming convention below
old/2021-docsrc/.old/AllInOneComponent.src.md: - `Route/` - Every `php` file will be `include`d & `$route` object can be called to create routes
old/2021-docsrc/.old/AllInOneComponent.src.md: - `Task/` - A task can be registered to run & tasks can basically do anything
old/2021-docsrc/.old/AllInOneComponent.src.md: - `/init.php` - `init.php` is `include`d every time a component is loaded & can do anything
old/2021-docsrc/.old/AllInOneComponent.src.md: - `/init-once.php` is `include`d the FIRST time the component is loaded on a request... and can do anything
old/2021-docsrc/.old/AllInOneComponent.src.md: - `Lia/Component.php` - The optional `Component` class can override the default `Component` class & use overridden methods to do certain things, as the Component loading process specifies
old/2021-docsrc/.old/AllInOneComponent.src.md: - `@METHOD` specifies the method(s) to respond to. Such as `@POST@GET`.
old/2021-docsrc/.old/AllInOneComponent.src.md: - If none is specified, Only GET requests are allowed
old/2021-docsrc/.old/AllInOneComponent.src.md: - This MUST be at the beginning of the file name
old/2021-docsrc/.old/AllInOneComponent.src.md: - The method list is terminated with a `.`
old/2021-docsrc/.old/AllInOneComponent.src.md: - `$paramater` - `paramater` (in the file name) must match REGEX `[a-zA-Z0-9\_]+\#?`.
old/2021-docsrc/.old/AllInOneComponent.src.md: - Any character NOT matching this terminates the dynamic portion of the url & is a literal character
old/2021-docsrc/.old/AllInOneComponent.src.md: - `#` terminates the param name but IS NOT a literal character. You can subsequently add another `#` after the terminating `#` to have a literal `#`
old/2021-docsrc/.old/AllInOneComponent.src.md: - Ex: file `$pet1##$pet2` responds to url `/cat#dog/`
old/2021-docsrc/.old/AllInOneComponent.src.md: - `$¶mater` declares an optional paramater.
old/2021-docsrc/.old/AllInOneComponent.src.md: - `.` declares a `/` in the url
old/2021-docsrc/.old/AllInOneComponent.src.md: - `..` or `literal.$&optional.php` (where the optional param is not present) will be handled as a single `.`...
old/2021-docsrc/.old/AllInOneComponent.src.md: - How do I do a literal `.` in the url? Or a literal `$`? or literal `&`
old/2021-docsrc/.old/AllInOneComponent.src.md: - V1: No `.` in urls. No `$` in urls
old/2021-docsrc/.old/AllInOneComponent.src.md: - V2:
old/2021-docsrc/.old/AllInOneComponent.src.md: - Maybe `&.`?
old/2021-docsrc/.old/AllInOneComponent.src.md: - and `&$` ?
old/2021-docsrc/.old/AllInOneComponent.src.md: - and `&&` ?
old/2021-docsrc/.old/Usage/Config.src.md:$lia->default('lia.cacheDir', $liaRootDir.'/cache/');
old/2021-docsrc/.old/Usage/Config.src.md:$lia->set('lia.cacheDir', __DIR__.'/cache/'):
old/2021-docsrc/.old/Usage/Config.src.md:$cacheDir = $lia->get('lia.cacheDir');
old/2021-docsrc/.old/Usage/Config.src.md:## Package-level configs
old/2021-docsrc/.old/Usage/Config.src.md:## Component-level configs
old/2021-docsrc/.old/Usage/Routing.src.md:## Auto-route to files in `public` dir
old/2021-docsrc/.old/Usage/Routing.src.md:## Override the built-in router & more complex routing
old/2021-docsrc/.old/Usage/Routing.src.md:This has not been documented nor set up well, yet. The gist is to replace the global function that the built-in Router makes. This documentation should probably go in 'Advanced'
old/2021-docsrc/.old/Usage/View.src.md:$site->set('views.conflict', 'ignore');
old/2021-docsrc/.old/Usage/View.src.md:$lia->set('package.MySite.views.conflict', 'throw');
old/2021-docsrc/.old/Usage/View.src.md:$lia->setViewConflictMode('overwrite');
old/2021-docsrc/.old/Usage/View.src.md:$lia->addView('conflictingName', ....); // this will be the view used
old/2021-docsrc/Blah/Autoload.src.md:Put class files in the `class` directory of your package in a [`PSR-4`](https://www.php-fig.org/psr/psr-4/) style. So `\Taeluf\FunnyStrings` should be at `class/Taeluf/FunnyStrings.php`
old/2021-docsrc/Blah/Autoload.src.md:$lia->autoload($dir.'/hierarchy');
old/2021-docsrc/Blah/Autoload.src.md:$lia->autoload($dir.'/flat',['Payment\\Processor', 'User\\Auth'])
old/2021-docsrc/Blah/Autoload.src.md: - Contact/
old/2021-docsrc/Blah/Autoload.src.md: - Submitter.php: namespace Contact, class Submitter
old/2021-docsrc/Blah/Autoload.src.md: - Customer/
old/2021-docsrc/Blah/Autoload.src.md: - Order.php, namespace Customer, class Order
old/2021-docsrc/Blah/Autoload.src.md: - Person.php, ns Customer, cls Person
old/2021-docsrc/Blah/Autoload.src.md: - Visa.php: ns Payment\Processor, cls Visa
old/2021-docsrc/Blah/Autoload.src.md: - Bitcoin.php: ns Payment\Processor, cls Bitcoin
old/2021-docsrc/Blah/Autoload.src.md: - Oauth.php: ns User\Auth, cls Oauth
old/2021-docsrc/Blah/Autoload.src.md:- Replace PSR-4 style with classmap-style (just scan the directory for all classes & cache the result in a file.)
old/2021-docsrc/Blah/Autoload.src.md:Call `$lia->autoload($directory, $baseNamespaces=[])`. This adds the directory to be searched in a `PSR-4` style. If you want to do away with a directory, pass namespaces. Like: `$lia->autoload($dir, ['Taeluf'])`, then you could place class `Taeluf\FunnyStrings` directly in `$dir/FunnyStrings.php` & it will be loaded.
old/2021-docsrc/Blah/Autoload.src.md:If you're developing an app, use the api. Instead of `$lia->autoload(...)`, call `$lia->callApi('lia.autoload', $directory, $namespaces=[])`; If you're developing a website, `$lia->autoload()` is recommended.
old/2021-docsrc/Blah/Autoload.src.md:Call `$lia->addAutoloader($callback)` where `$callback` takes a single param `$fullyQualifiedClassName`. For consistent apis use `$lia->api('lia.autoload', 'add', $callback)` instead. Of course, you could just use `spl_autoload_register`.
old/2021-docsrc/Blah/Autoload.src.md: $this->myWildMapToFiles[$className];
old/2021-docsrc/Blah/Caching.src.md:Two files are created when you cache a file: `file-ns.thekey` and `meta-ns.thekey`. The `meta-` file stores the expiry and may hold more information in the future. The `file-` stores the content.
old/2021-docsrc/Blah/Caching.src.md:- The cache is used by the Resources class to handle your compiled css and js files.
old/2021-docsrc/Blah/Caching.src.md:$lia->set('lia.cacheDir', $yourPackage->dir('cache'));
old/2021-docsrc/Blah/Caching.src.md:- You MAY use an explicit path instead of using your `$package->dir()` lookup
old/2021-docsrc/Blah/Caching.src.md:- `lia.cacheDir` may be anywhere you like.
old/2021-docsrc/Blah/Caching.src.md:Call `$lia->cacheFile($key, $content, $maxAgeInSeconds)` to store a file in the cache.
old/2021-docsrc/Blah/Caching.src.md: - You may leave off `$maxAgeInSeconds` to use the default, which is five days
old/2021-docsrc/Blah/Caching.src.md: - Cache files cannot be loaded after they expire and will be automatically cleaned up at some point.
old/2021-docsrc/Blah/Caching.src.md:Call `$lia->getCacheFile($key)` to get the contents of a cached file
old/2021-docsrc/Blah/Caching.src.md: - returns `false` if the cache file does not exist or has expired
old/2021-docsrc/Blah/Caching.src.md: - Files are returned as a string. JSON is not decoded. PHP files are not processed.
old/2021-docsrc/Blah/Config.src.md:- `set($key, $val)` will override any previously set `$key`
old/2021-docsrc/Blah/Config.src.md:- `default($key, $val)` will never override `set()` or previous `default()` calls
old/2021-docsrc/Blah/Config.src.md:- `get($key)` will throw an exception if the `$key` has not been set
old/2021-docsrc/Blah/Config.src.md:- `$lia->set('packageName.cofig.key', 'value');`
old/2021-docsrc/Blah/Config.src.md:- `$package->set('config.key', 'value');`
old/2021-docsrc/Blah/Config.src.md:- `new \Lia\Package($liaison, $dir, $configs=['config.key'=>'value', 'another.key'=>'value2']);`
old/2021-docsrc/Blah/Config.src.md: - Or use sub-arrays instead of dot-notation: `$configs=['config'=>['key'=>'value']];`
old/2021-docsrc/Blah/Config.src.md:- In the `config.json` file at the root of your package, containing `{"config.key":"value"}` OR nested keys: `{"config":{"key":"value"}}`
old/2021-docsrc/Blah/Config.src.md: - Do both nested keys & dot keys work? (pretty sure)
old/2021-docsrc/Blah/Config.src.md:- `dir.public.baseUrl` set to an absolute url path with trailing & leading slashes, like `/user/` or `/blog/`. Defaults to `/`. Your `public/index.php` file will be delivered at the base url.
old/2021-docsrc/Blah/Config.src.md:-
old/2021-docsrc/Blah/Config.src.md:Set global configs with `$lia->set('the.setting.name', 'the value');`.
old/2021-docsrc/Blah/Config.src.md:- `lia.cacheDir` - absolute path to the directory to use as your cache. Recommended usage: `$lia->set('lia.cacheDir', $mainPackage->dir('cache'));`
old/2021-docsrc/Blah/Config.src.md:- `lia.resource.useCache` - set true or false. `true` is default. Cache files are created regardless, but if set `false`, cache files will not be used after initial generation.
old/2021-docsrc/Blah/Config.src.md:- `lia.resource.forceRecompile` - true or false (default). `true` forces recompilation of resource files on every request. I don't remember the rules for recompilation otherwise.
old/2021-docsrc/Blah/Config.src.md:- `lia.resource.useCache` - set true or false. `true` is default. Cache files are created regardless, but if set `false`, cache files will not be used after initial generation.
old/2021-docsrc/Blah/Config.src.md:- `lia.Cache.clearAfterXMinutes`: Maximum frequency that stale cache files should be checked for deletion. Default is `60*24*5` (5 days)
old/2021-docsrc/Blah/Config.src.md: - You can also set it to `0.5` to set the frequency to 30 seconds.
old/2021-docsrc/Blah/Config.src.md: - Stale cache files are only cleared at the end of a request, so if you set your cache to clear every 30 seconds, but you only have a request every 15 minutes, your cache files will only be checked for staleness every 15 minutes.
old/2021-docsrc/Blah/Config.src.md: - The maximum time allowed is 180 days
old/2021-docsrc/Blah/Config.src.md:- `lia.cacheDir`: The directory
old/2021-docsrc/Blah/Config.src.md:- `lia.Server.bufferResponse` true or false: If true (default), sends all output buffers before emitting the `Server.responseSent` event. This might not work without Apache configurations
old/2021-docsrc/Blah/Config.src.md:- Hook into set & get calls. Ex: `$lia->set('lia.views.conflictMode','overwrite')` would call the `Config` component's `setViewConflictMode()` method
old/2021-docsrc/Blah/Events.src.md:This function would be called for `$lia->emit('ResponseSent')` event.
old/2021-docsrc/Blah/Events.src.md:Just call `$lia->emit('nameOfEvent', $param1, $param2, ...$etc)`
old/2021-docsrc/Blah/Events.src.md:Call `$lia->schedule('Namespace.nameOfEvent', $callable)`. Then `$callable` will be invoked whenever `Namespace.nameOfEvent` is emitted.
old/2021-docsrc/Blah/Events.src.md:- We haven't documented this yet...
old/2021-docsrc/Blah/FancyClosure.src.md:$closure(); // calls $cat->purr($loudness);
old/2021-docsrc/Blah/FancyClosure.src.md:$closure->funcName === 'purr';
old/2021-docsrc/Blah/FancyClosure.src.md:$closure->object === $cat;
old/2021-docsrc/Blah/FancyClosure.src.md:$closure->class === 'Funny\\Cat'; //it prints with a single slash, but backslashes are generally better off being escaped in my experience
old/2021-docsrc/Blah/FancyClosure.src.md:$closure->isStatic === false; // would be true if using ['Funny\Cat', 'purr'] instead of [$cat, 'purr']
old/2021-docsrc/Blah/FancyClosure.src.md:$closure->isAnonymous === false; // would be true for function(){echo 'Kindness can be anonymous too.';}
old/2021-docsrc/Blah/FancyClosure.src.md:$closure->function === null; // would be the anonymous function, if you had passed a function instead of an `[$obj, 'funcName']` callable
old/2021-docsrc/Blah/FancyClosure.src.md:$closure->origCallable === [$cat, 'purr']; //just the first arg you pass to the constructor
old/2021-docsrc/Blah/FancyClosure.src.md:$closure->bound === [$loudness]; // and this is the 2nd arg
old/2021-docsrc/Blah/Goto.src.md:$url = $package->url('/register/'); // pre-pends the url prefix for the package
old/2021-docsrc/Blah/Goto.src.md:## Built-in Methods
old/2021-docsrc/Blah/Goto.src.md:- `$lia->goto($url, $statusCode=302);` - Standard redirect to the url
old/2021-docsrc/Blah/Goto.src.md:- `$lia->gotoWithMessage($url, "You don't have access to this page", $statusCode=302);`
old/2021-docsrc/Blah/Goto.src.md: - Redirect to the url with the given message.
old/2021-docsrc/Blah/Goto.src.md:- `$lia->gotoWithContent($url, $statusCode=302);`
old/2021-docsrc/Blah/Goto.src.md: - Redirect to the url with the content of the current request.
old/2021-docsrc/Blah/Goto.src.md:$url = $package->url('/'); // returns '/user/'
old/2021-docsrc/Blah/Goto.src.md:$lia->gotoWithContent($url); //Default 302 temporary is good. 301 permanent would cause the browser to do an immediate redirect in the future, instead of running the request to /user/logout/, and that would be bad.
old/2021-docsrc/Blah/Goto.src.md:<div class="goto-message">
old/2021-docsrc/Blah/Goto.src.md: <?=$lia->getGotoMessage()?>
old/2021-docsrc/Blah/Goto.src.md:if ($userIsLoggedIn) echo $this->view("user/profile",['user'=>$user]);
old/2021-docsrc/Blah/Goto.src.md:else echo $this->view('user/login');
old/2021-docsrc/Blah/Hello-World.md:- `git clone https://gitlab.com/taeluf/Liaison.git`
old/2021-docsrc/Blah/Hello-World.md: - Make a 'vendor' folder in your project directory, then run `git clone` inside `vendor`
old/2021-docsrc/Blah/Hello-World.md:- `composer require taeluf/liaison dev-valpha`
old/2021-docsrc/Blah/Hello-World.md: - You MUST add `"minimum-stability": "dev"` to your `composer.json`
old/2021-docsrc/Blah/Hello-World.md:- Edit `composer.json` to include `"require":{"taeluf/liaison": "dev-valpha"}`, then run `composer install`
old/2021-docsrc/Blah/Hello-World.md:Setup a [virtual host](Tips/virtual-host.md) so you can view this sample website in your browser.
old/2021-docsrc/Blah/Hello-World.md:- Create a `.htaccess` file at the root of your site with the following:
old/2021-docsrc/Blah/Hello-World.md:- Create `deliver.php` file in the root of your site:
old/2021-docsrc/Blah/Hello-World.md:$liaison->set('lia.resource.useCache',false);
old/2021-docsrc/Blah/Hello-World.md:$liaison->set('lia.cacheDir',$myApp->dir('cache'));
old/2021-docsrc/Blah/Hello-World.md:$liaison->deliver();
old/2021-docsrc/Blah/Hello-World.md:- `index.php`: Just code in a `<h1>Index Page</h1>`
old/2021-docsrc/Blah/Hello-World.md:- `{cause}.php`: No code, yet. & Yes, you DO need the curly braces in the file name.
old/2021-docsrc/Blah/Hello-World.md:1. Visit `site.localhost/stop-global-warming/` You see the cause (or the slug, anyway)
old/2021-docsrc/Blah/Hello-World.md:2. Visit `/treatment-over-prison/`: You see the cause
old/2021-docsrc/Blah/Hello-World.md:3. Visit `/black-lives-matter/end-over-policing/`: You don't get a page, because the dynamic paramater does not allow slashes
old/2021-docsrc/Blah/Hello-World.md:$view = $lia->view('button/refresh');
old/2021-docsrc/Blah/Hello-World.md: border-radius: 8px 50%;
old/2021-docsrc/Blah/Hello-World.md:1. Edit the `$lia->view('button/refresh')` call in `index.php` to: `$lia->view('button/refresh', ['name'=>'SomeName'])`
old/2021-docsrc/Blah/Hello-World.md:- My [php environment package](http://tluf.me/php-environment/) helps with runtime changes between localhost, staging server, and production server
old/2021-docsrc/Blah/MethodsOverview.src.md:- deliver($url=null, $method=null)
old/2021-docsrc/Blah/MethodsOverview.src.md: - uses the requested url by default, but you can pass in a url, which may include a get string like `?cats=cute`
old/2021-docsrc/Blah/MethodsOverview.src.md:- addPackage($options): $options is an array
old/2021-docsrc/Blah/MethodsOverview.src.md: - dir: The root directory of your package
old/2021-docsrc/Blah/MethodsOverview.src.md: - name: The name to be used for retrieving your package.
old/2021-docsrc/Blah/MethodsOverview.src.md: -Each package must have a unique name
old/2021-docsrc/Blah/MethodsOverview.src.md:- package($name): retrieve a package by name
old/2021-docsrc/Blah/MethodsOverview.src.md:- packages(): A list of packages
old/2021-docsrc/Blah/MethodsOverview.src.md:- compo($name): For each package, get any components named `$name`.
old/2021-docsrc/Blah/MethodsOverview.src.md: - 0 components found, return null, 1 component found, return the component, 2+ components found, throw an exception
old/2021-docsrc/Blah/MethodsOverview.src.md:- set($key, $value) & get($key,$valueIfNotFound): Store & retrieve values across the $lia instance
old/2021-docsrc/Blah/MethodsOverview.src.md:- view($name, $passthru): Get a view (from any package) by $name, passing $passthru to the view.
old/2021-docsrc/Blah/MethodsOverview.src.md: - See [Views](0-docs/Views.md) for more information
old/2021-docsrc/Blah/MethodsOverview.src.md:- register($eventName, $object, $method=null): Register the event to be executed
old/2021-docsrc/Blah/MethodsOverview.src.md:- send($eventName,$arg1, $arg2, $arg3, ....): Execute the given event, passing the list of args along.
old/2021-docsrc/Blah/MethodsOverview.src.md: - See [Events](0-docs/Events.md)
old/2021-docsrc/Blah/Prefix.src.md:Prefixing allows you to add to your local `$liaison` api in declarative class-driven ways.
old/2021-docsrc/Blah/Prefix.src.md:- Prefixes must be followed by an uppercase letter: `autoloadBlogClasses` works. `autoloadblogClasses` does NOT
old/2021-docsrc/Blah/Prefix.src.md:- OR an underscore followed by a letter: `autoload_BlogClasses` AND `autoload_blogClasses` will BOTH work
old/2021-docsrc/Blah/Prefix.src.md:- Every prefix MUST point to an api key + handler.
old/2021-docsrc/Blah/Prefix.src.md:- Prefixes are set globally on the `Liaison` object.
old/2021-docsrc/Blah/Prefix.src.md:- New prefixes can be added or removed GLOBALLY with `$liaison->addApiPrefix('theprefix', 'api.key', $handler='prefix')`.
old/2021-docsrc/Blah/Prefix.src.md:- A prefix CAN (but usually should not) point to a different handler
old/2021-docsrc/Blah/Prefix.src.md:- A prefix handler receives `$cleanName, $callable` where `$cleanName` is everything after the prefix. This WILL include the underscore (`_`) if present.
old/2021-docsrc/Blah/Prefix.src.md:- Remove: `$lia->removePrefix('autoload')` will stop the `autoload` prefix from working. The API will be unchanged.
old/2021-docsrc/Blah/Prefix.src.md:- Add: `$lia->addApiPrefix('al', 'lia.autoload')`.
old/2021-docsrc/Blah/Prefix.src.md:- Use a named handler (instead of the default `prefix`): `$lia->addApiPrefix('al', 'lia.autoload', $handler='locations')`. Note there is no `locations` handler for the `lia.autoload` api. But one could theoretically be added with different functionality from the built-in autoload prefix handler.
old/2021-docsrc/Blah/Prefix.src.md:- Quick & Dirty: `$lia->addPrefix('al', function($cleanName, $callable){})`. That function will process any methods using the `al` prefix. This is good for a single website, but not so good if you're creating a proper API for others to use.
old/2021-docsrc/Blah/Prefix.src.md:- With proper Api: `$lia->addApi('lia.autoload', function($cleanName,$callable){}, 'prefix')`. Then create the prefix: `$lia->addPrefix('autoload', 'lia.autoload');`
old/2021-docsrc/Blah/Prefix.src.md:Override `getApiPrefixes()` of the `Scanner` trait. Basically, call `$this->Scanner_getApiPrefixes()` to get the global prefixes, then modify them as you please.
old/2021-docsrc/Blah/Prefix.src.md: $globalPrefixes = $this->Scanner_getApiPrefixes();
old/2021-docsrc/Blah/Prefix.src.md:If you want to change prefixes for all components in your app, then create a base component extending from `Lia\Compo` that customizes prefixes. Then each of your components can extend from that base component. That base component should be in your `class` dir, unless it should do additional component-y things.
old/2021-docsrc/Blah/Prefix.src.md:App & extension developers should always expose their api with a key, using the `$lia->addApi(...); $lia->addApiPrefix()` approach. Doing so means a website developer can customize their experience by changing what liaison methods point to which api. But other applications can still call your api by its unchanging api key & handler name.
old/2021-docsrc/Blah/Resources.src.md:$lia->setResourceOrder('css', ['five.css', 'one.css', 'two.css', 'specificdir/three.css', 'otherdir/three.css', 'butactually/five.css']);
old/2021-docsrc/Blah/Resources.src.md:- The files will be delivered in the order they're declared in the array.
old/2021-docsrc/Blah/Resources.src.md:- the file at `butactually/five.css` will be the 5th css file delivered.
old/2021-docsrc/Blah/Resources.src.md: - Since the longer relative path is specified, the shorter one (`'five.css'` is ignored).
old/2021-docsrc/Blah/Resources.src.md: - `'five.css'` could still be relevant if there's a different `five.css` file in a different directory.
old/2021-docsrc/Blah/Resources.src.md:- There are two `three.css` files. Imagine we replaced `'specificdir/three.css', 'otherdir/three.css'` and only put `'three.css'`
old/2021-docsrc/Blah/Resources.src.md: - There's no guarantee which `three.css` file would come first in the output
old/2021-docsrc/Blah/Resources.src.md: - both `three.css` files would be AFTER `two.css` and BEFORE `butactually/five.css`
old/2021-docsrc/Blah/Routing.src.md:- `public/index.php` Delivers at `/`. index.php files will be delivered without the file name or extension
old/2021-docsrc/Blah/Routing.src.md:- `public/dir/file.php` files will be delivered at `/dir/file/`
old/2021-docsrc/Blah/Routing.src.md:- `public/resource.js` and other non `.php` files will be delivered at `/resource.ext`
old/2021-docsrc/Blah/Views.src.md:- Blog.php
old/2021-docsrc/Blah/Views.src.md:- Blog.js
old/2021-docsrc/Blah/Views.src.md:- Blog.css
old/2021-docsrc/Blah/Views.src.md:- Theme.php
old/2021-docsrc/Blah/Views.src.md:- Theme/
old/2021-docsrc/Blah/Views.src.md: - anyName.js
old/2021-docsrc/Blah/Views.src.md: - anyName.css
old/2021-docsrc/Blah/Views.src.md:- Calling `$view = $lia->view('Theme', $args)` will encompass `Theme.php` and load every single `.js` and `.css` file in the `Theme` directory
old/2021-docsrc/Blah/Views.src.md:- Calling `$view = $lia->view('Blog', $args)` will encompass `Blog.php` for the view and load `Blog.js` and `Blog.css`
old/2021-docsrc/Blah/Views.src.md:- `$args` are `extract`ed so your `Theme.php` & `Blog.php` files receive the array keys as paramaters.
old/2021-docsrc/Blah/Views.src.md:- Resource files are loaded when you call `$view->resources()`, `$content = $view->content()`, or `$content = "".$view;` (tostring)
old/2021-docsrc/Blah/Views.src.md:- Place your view in a subdirectory like `view/Theme/Light.php` for a view named `Theme/Light`
old/2021-docsrc/Blah/Views.src.md:- Namespacing. Views gotta have namespaces
old/2021-docsrc/Blah/Views.src.md:- Do nesting views load too many resources? Ex: `view/Theme/Light.[php|css|js]` `$lia->view('Theme')`. Does it include `Light.[css|js]`? It shouldn't, but I think it does.
old/2021-docsrc/Blah/Views.src.md:$lia->setViewConflictMode('overwrite');
old/2021-docsrc/Blah/Views.src.md:`$mySite`'s `theme` view will be displayed when `$lia->view('theme')` is called
old/2021-docsrc/Blah/Views.src.md:$lia->setViewConflictMode('overwrite');
old/2021-docsrc/Blah/Views.src.md:$lia->addView('\\Lia\\Obj\\View', $viewDir, $viewName);
old/2021-docsrc/Blah/old-README.src.md:Build full GUI framework/cms-agnostic PHP applications. Many apps will require zero configuration and zero routing code. And build full websites.
old/2021-docsrc/Blah/old-README.src.md: - config.json - Usually not needed
old/2021-docsrc/Blah/old-README.src.md: - class/ - General classes which get autoloaded
old/2021-docsrc/Blah/old-README.src.md: - BlogPost.php
old/2021-docsrc/Blah/old-README.src.md: - core/ - Liaison components
old/2021-docsrc/Blah/old-README.src.md: - Blog.php - Handles creating / editing of blog posts and sitemap generation.
old/2021-docsrc/Blah/old-README.src.md: - public/ -
old/2021-docsrc/Blah/old-README.src.md: - index.php - delivers at `/`
old/2021-docsrc/Blah/old-README.src.md: - about.md - delivers at `/about/` (requires CommonMark)
old/2021-docsrc/Blah/old-README.src.md: - image.png - delivers at `/image.png` (directories are cool, too)
old/2021-docsrc/Blah/old-README.src.md: - contact-us.php - `/contact-us/`, has a <form>
old/2021-docsrc/Blah/old-README.src.md: - @POST.contact-us.php - `/contact-us/` accepts the <form> submission
old/2021-docsrc/Blah/old-README.src.md: - blog/
old/2021-docsrc/Blah/old-README.src.md: - {slug}.php - `/blog/the-slug/` script to show your blog posts for the given slug
old/2021-docsrc/Blah/old-README.src.md: - view/
old/2021-docsrc/Blah/old-README.src.md: - blog.php - `echo $lia->view('blog');`
old/2021-docsrc/Blah/old-README.src.md: - blog.css - auto-included when 'blog' view is displayed
old/2021-docsrc/Blah/old-README.src.md: - blog.js - same as the .css
old/2021-docsrc/Blah/old-README.src.md: - blog/ - css & js files will also be included automatically
old/2021-docsrc/Blah/old-README.src.md: - extra.css
old/2021-docsrc/Blah/old-README.src.md: - extra.js
old/2021-docsrc/Blah/old-README.src.md: // static `public/` files will be auto-included in your sitemap
old/2021-docsrc/Blah/old-README.src.md:$lia->seoTitle($blogPost->title);
old/2021-docsrc/Blah/old-README.src.md:$lia->seoImage($blogPost->image);
old/2021-docsrc/Blah/old-README.src.md:echo $lia->view('blog',['post'=>$blogPost]);
old/2021-docsrc/Blah/old-README.src.md: <h1><?=$post->title?></h1>
old/2021-docsrc/Blah/old-README.src.md: <div><?=$post->bodyAsHtml()?></div>
old/2021-docsrc/Blah/old-README.src.md:$lia->deliver();
old/2021-docsrc/Blah/outline-README.src.md:Check out our [Hello World](Hello-World.md) tutorial for a step-by-step setup of a simple package
old/2021-docsrc/README.src.md:I'm using this in production right now, but its a mess. There's a lot of stuff that works great, but the dev experience is still pretty bad in some places, in large part due to a lack of documentation. But also because some of the request-delivery stuff is just awful.
old/2021-docsrc/README.src.md:- `Liaison` manages apis & their global aliases.
old/2021-docsrc/README.src.md:- `Lia\Package` handles resources in a given directory:
old/2021-docsrc/README.src.md: - load configs & manage them
old/2021-docsrc/README.src.md: - load components & manage them
old/2021-docsrc/README.src.md: - load views
old/2021-docsrc/README.src.md: - convert public files into routes
old/2021-docsrc/README.src.md: - set up autoloader
old/2021-docsrc/README.src.md: - has LifeCycle functions, which are handled by a built-in component
old/2021-docsrc/README.src.md:- `Lia\Compo` is a base class to simplify setting up components
old/2021-docsrc/README.src.md:- dir `class/Object/*` are objects used by built-in components
old/2021-docsrc/README.src.md:- dir `class/Utility/*` are Utility classes
old/2021-docsrc/README.src.md:- dir `view/theme` provides a default theme
old/2021-docsrc/README.src.md:- dir `file/mime_type_map.php` is just that
old/2021-docsrc/README.src.md:- Autoloader: loads classes within given directories
old/2021-docsrc/README.src.md:- Cache: caches files with given content for specified time period
old/2021-docsrc/README.src.md:- Config: Handles global configurations (used across packages) and can propagate configs to packages
old/2021-docsrc/README.src.md:- Error: Handles both internal errors & request errors. @TODO
old/2021-docsrc/README.src.md:- Event: api to schedule and emit events,
old/2021-docsrc/README.src.md:- GlobalParam: Manages variables that should be given to all parts of a Liaison server.
old/2021-docsrc/README.src.md:- LifeCycle: Manages objects that have lifecycle methods. Executes onPreMethod and onMethod when the registered lifecycle starts
old/2021-docsrc/README.src.md:- PackageList: Keeps a list of packages, accessible by name
old/2021-docsrc/README.src.md:- Redirect: Redirect requests, with content, if desired.
old/2021-docsrc/README.src.md:- Resources:
old/2021-docsrc/README.src.md: - Add css & js files, urls, and/or code blocks to a request
old/2021-docsrc/README.src.md: - Sorting api to set order of resource files in compiled output
old/2021-docsrc/README.src.md: - Routes to compiled resource files
old/2021-docsrc/README.src.md: - Manages seo information (this should go in a new component)
old/2021-docsrc/README.src.md: - Outputs headHtml (must be called)
old/2021-docsrc/README.src.md: - Passes compiled files to cache component
old/2021-docsrc/README.src.md:- ResourceSorter: A wrapper around the `Resources` sorting api, to make it easier
old/2021-docsrc/README.src.md:- Router: Set pattern & static routes. Parse paramaters from urls. Process url for route target (package, callable, file)
old/2021-docsrc/README.src.md:- Server: Handles request delivery
old/2021-docsrc/README.src.md: - Helps all the components work together to respond to a url
old/2021-docsrc/README.src.md: - delivers static non-php files
old/2021-docsrc/README.src.md:- View: Register views, and create View objects from given paramaters.
old/2021-docsrc/README.src.md: - config.json <- Package settings
old/2021-docsrc/README.src.md: - public/ <- Public files to be routed to. Ex: `public/contact.php` routes to `/contact/`
old/2021-docsrc/README.src.md: - view/ <- Views
old/2021-docsrc/README.src.md: - core/ <- Components (generally extending from \Lia\Compo)
old/2021-docsrc/README.src.md: - class/ <- Classes to autoload, PSR4 style. Will be converted to classmap style later
old/2021-docsrc/README.src.md: - cache/ <- Where to store cache files. Though cache files are stored in a global package dir, not a package-by-package basis
old/2021-docsrc/README.src.md:- Environment-dependent features are not built-in, but I recommend my [Env php class](https://tluf.me/php-environment)
old/2021-docsrc/README.src.md:- There is no namespacing. But there WILL be namespacing. (of views, apis, public files)
old/2021-docsrc/README.src.md:- A file cache exists, but not a `key=>value` cache, and its horrible
old/2021-docsrc/README.src.md:- The api for... adding apis is clunky (to use. performance should be fine)
old/2021-docsrc/README.src.md:2. Server setup: Database configuration, other non-liaison things
old/2021-docsrc/README.src.md:3. `$lia = new Liaison()` <- Liaison adds its built-in package (or pass `['bare'=>true]`)
old/2021-docsrc/README.src.md: 2. `$Component->onCreate()` <- Called from `\Lia\Compo`
old/2021-docsrc/README.src.md: 3. `$Component->onReady()` <- Called from `\Lia\Compo`
old/2021-docsrc/README.src.md: 4. `$Component->onComponentsLoaded()` <- After all components in THIS package have called `onCreate` & `onReady`. Called by `\Lia\Package`
old/2021-docsrc/README.src.md: 5. `$Component->onPackageReady()` <- After routes, views, & configs have been loaded for this package
old/2021-docsrc/README.src.md: - `$Component->onPrePackageReady()` is called first, but is not recommended. If used, you must call `parent::onPrePackageReady()` to keep prefix scanning enabled
old/2021-docsrc/README.src.md:5. `$lia->deliver()` calls `$lia->getResponse()` (the following is all called from `\Lia\Compo\Server`)
old/2021-docsrc/README.src.md: 1. `$lia->emit('PreAllPackagesReady')`
old/2021-docsrc/README.src.md: 2. emit `AllPackagesReady` <- Handle in components by declaring `onEmitAllPackagesReady()`
old/2021-docsrc/README.src.md: 8. `if ($response->useTheme)`, load theme, emit `ThemeLoaded($themeView)`, then set `$response->content` to `(string)$themeView`
old/2021-docsrc/README.src.md:6. `$lia->deliver()` has a response
old/2021-docsrc/README.src.md: 1. `$response->sendHeaders()`
old/2021-docsrc/README.src.md: 2. `if ($response->sendContent) echo $response->content`
old/2021-docsrc/README.src.md:- Set no-cache headers for non raw-file requests
old/2021-docsrc/README.src.md:- Write docs for declaring APIs
old/2021-docsrc/README.src.md: - Review the `Api` trait & see if I can make it more intuitive
old/2021-docsrc/README.src.md:- Add namespacing of views, public files, & other package-specific components
old/2021-docsrc/README.src.md:- Document all prefixes available & how to use them & how to change them
old/2021-docsrc/README.src.md:- Stop relying upon the funky function naming conventions (but don't get rid of prefixing alltogether)
old/2021-docsrc/README.src.md:- simple `key=>value` caching
old/2021-docsrc/README.src.md:- Document both PACKAGE lifecycle AND component lifecycle
old/2021-docsrc/README.src.md:- Basically just document how to use everything
Errors.md:- checks all methods to check for the php fatal error with recursive method calling
Errors.md: return $this->methods[$method](...$args);
Errors.md:$lia->methods['some_method'] = [$addon, 'some_method'];
Errors.md:$lia->some_method();
Errors.md:where `$this->some_method()` does not exist. The Stack is like:
Errors.md:1. $lia->some_method() invokes $lia->__call('some_method')
Errors.md:2. $lia->__call() gets $lia->methods['some_method'] and invokes it.
Errors.md:3. $lia->methods['some_method'] points to callable [$addon, 'some_method']
Errors.md:4. $addon->some_method() invokes $addon->_call('some_method')
Errors.md:Since $addon->methods = &$lia->methods,
Changes.md:- Autoloader
Changes.md: - rename to Autoload
Changes.md: - remove methods to register autoload functions, because it called spl_autoload_register
test/input/AppPackage/cache/abc.file:some-value
test/input/Views/theme/main.css: min-height:100%;
test/input/Views/theme/main.css: flex-direction:column;
test/input/Views/theme/main.css: min-height: 40px;
test/input/Views/theme/main.css: min-height: 100px;
test/input/Views/test.php:test-view
test/input/Views/theme.php: <?='';//$lia->view('lia/Resources');?>
test/input/Views/theme.php: <?=$lia->getResourceHtml();?>
test/input/Views/theme.php: <?=isset($lia->addons['error'])?$lia->addons['error']->headerMessage:''?>
test/input/Views/theme.php: <?=''//$lia->view('lia/Content'); ?>
test/input/Views2/test.php:test-dir
test/run/ToSort/Addon/Autoload.php: $rand_name = $this->random();
test/run/ToSort/Addon/Autoload.php: $class_code = $this->get_class_code($class_name);
test/run/ToSort/Addon/Autoload.php: $file = $this->al_dir().'/'.$rand_name.'.php';
test/run/ToSort/Addon/Autoload.php: $autoloader->addDir($this->al_dir(), $namespaces_in_dir);
test/run/ToSort/Addon/Autoload.php: $autoloader->enable();
test/run/ToSort/Addon/Autoload.php: $this->compare($class_name, get_class($class));
test/run/ToSort/Addon/Autoload.php: $class_name = 'some_ns\\for_you\\'.$this->random();
test/run/ToSort/Addon/Autoload.php: $class_code = $this->get_class_code($class_name);
test/run/ToSort/Addon/Autoload.php: $file = $this->al_dir().'/'.str_replace('\\','/',$class_name).'.php';
test/run/ToSort/Addon/Autoload.php: $autoloader->addDir($this->al_dir());
test/run/ToSort/Addon/Autoload.php: $autoloader->enable();
test/run/ToSort/Addon/Autoload.php: $this->compare($class_name, get_class($class));
test/run/ToSort/Addon/Autoload.php: $class_name = $this->random();
test/run/ToSort/Addon/Autoload.php: $class_code = $this->get_class_code($class_name);
test/run/ToSort/Addon/Autoload.php: $file = $this->al_dir().'/'.$class_name.'.php';
test/run/ToSort/Addon/Autoload.php: $autoloader->addDir($this->al_dir());
test/run/ToSort/Addon/Autoload.php: $autoloader->enable();
test/run/ToSort/Addon/Autoload.php: $this->compare($class_name, get_class($class));
test/run/ToSort/Addon/Autoload.php: $class_name = $this->random();
test/run/ToSort/Addon/Autoload.php: $class_code = $this->get_class_code($class_name);
test/run/ToSort/Addon/Autoload.php: $file = $this->al_dir().'/'.$class_name.'.php';
test/run/ToSort/Addon/Autoload.php: $autoloader->addDir($this->al_dir());
test/run/ToSort/Addon/Autoload.php: $autoloader->enable();
test/run/ToSort/Addon/Autoload.php: $this->compare($class_name, get_class($class));
test/run/ToSort/Addon/Autoload.php: $this->compare(true, isset($lia->methods['autoload']));
test/run/ToSort/Addon/Autoload.php: $this->compare(true, isset($lia->addons[$autoloader->name]));
test/run/ToSort/Addon/Autoload.php: $this->compare_raw($lia->methods['autoload'], [$lia->addons[$autoloader->name], 'addDir'], true);
test/run/ToSort/Addon/Redirect.php: // $this->disable();
test/run/ToSort/Addon/Redirect.php: // $lia->addRoute($_SERVER['REQUEST_URI'],
test/run/ToSort/Addon/Redirect.php: // $lia=$route->package();
test/run/ToSort/Addon/Redirect.php: // $lia->goto('/black-lives-matter/');
test/run/ToSort/Addon/Redirect.php: // $response = $lia->getResponse();
test/run/ToSort/Addon/Redirect.php: // var_export($response->headers);
test/run/ToSort/Addon/Redirect.php: // return $this->compare(
test/run/ToSort/Addon/Redirect.php: // 'Location: /black-lives-matter/',
test/run/ToSort/Addon/Redirect.php: // $response->headers
test/run/ToSort/Addon/Redirect.php: $goto->set('cache.dir', $this->cache_dir());
test/run/ToSort/Addon/Redirect.php: $goto->gotoWithMessage($target_url, $message);
test/run/ToSort/Addon/Redirect.php: $actual_url = $goto->get_url();
test/run/ToSort/Addon/Redirect.php: $receive_goto->set('cache.dir', $this->cache_dir());
test/run/ToSort/Addon/Redirect.php: $actual_message = $receive_goto->getGotoMessage();
test/run/ToSort/Addon/Redirect.php: $this->compare($message, $actual_message);
test/run/ToSort/Addon/Redirect.php: $this->empty_dir($this->cache_dir());
test/run/ToSort/Addon/Redirect.php: return $this->cli->pwd.'/test/input/Cache/redirect/';
test/run/ToSort/Addon/Seo.php: $lia->seo($seo_data);
test/run/ToSort/Addon/Seo.php: $html = $lia->getSeoHtml();
test/run/ToSort/Addon/Seo.php: $this->compare($tHtml, $aHtml);
test/run/ToSort/Addon/Seo.php: $lia->seoTitle('Test Page');
test/run/ToSort/Addon/Seo.php: $lia->seoDescription('Test description');
test/run/ToSort/Addon/Seo.php: $lia->seoImage('/path/to/image.jpg', 'alt text for image');
test/run/ToSort/Addon/Seo.php: $lia->seoUrl('/canonical/url/');
test/run/ToSort/Addon/Seo.php: $lia->seoSiteName('Liaison test');
test/run/ToSort/Addon/Seo.php: $html = $lia->getSeoHtml();
test/run/ToSort/Addon/Seo.php: $this->compare($tHtml, $aHtml);
test/run/ToSort/Addon/Router.php: $params = ['category'=>'some-category'];
test/run/ToSort/Addon/Router.php: $target = '/blog/some-category/';
test/run/ToSort/Addon/Router.php: $decoded = $router->decode_pattern($pattern);
test/run/ToSort/Addon/Router.php: $filled = $router->decoded_pattern_to_url($decoded, $params);
test/run/ToSort/Addon/Router.php: $this->compare(
test/run/ToSort/Addon/Router.php: $url = '/blog/some-category/';
test/run/ToSort/Addon/Router.php: $decoded = $router->decode_pattern($pattern);
test/run/ToSort/Addon/Router.php: $extracted = $router->extract_url_paramaters($decoded, $url);
test/run/ToSort/Addon/Router.php: $this->compare(
test/run/ToSort/Addon/Router.php: ['category'=>'some-category'],
test/run/ToSort/Addon/Router.php: $decoded = $router->decode_pattern($pattern);
test/run/ToSort/Addon/Router.php: $actual_decoded = $router->separate_optional_from_decoded_pattern($decoded);
test/run/ToSort/Addon/Router.php: $this->compare($target, $actual_decoded);
test/run/ToSort/Addon/Router.php: * Example of `$router->url_to_regex()`
test/run/ToSort/Addon/Router.php: $test = $router->url_to_regex($url);
test/run/ToSort/Addon/Router.php: $this->compare($target ,$test);
test/run/ToSort/Addon/Router.php: * Example of `$router->decode_pattern()`
test/run/ToSort/Addon/Router.php: $actual_parsed = $router->decode_pattern("/blog/{slug}/{id}/");
test/run/ToSort/Addon/Router.php: $this->compare($target_parsed, $actual_parsed);
test/run/ToSort/Addon/Router.php: * Example of `$router->decoded_pattern_to_url()`. @see(testParsePatternExample) to see what the `$decoded` array looks like
test/run/ToSort/Addon/Router.php: $decoded = $router->decode_pattern("/blog/{slug}/{id}/");
test/run/ToSort/Addon/Router.php: $filled = $router->decoded_pattern_to_url($decoded, $fill);
test/run/ToSort/Addon/Router.php: $this->compare('/blog/cats/33/', $filled);
test/run/ToSort/Addon/Resources.php: // $this->disable();
test/run/ToSort/Addon/Resources.php: // $this->disable();
test/run/ToSort/Addon/Resources.php: // $this->disable();
test/run/ToSort/Addon/Resources.php: // $this->disable();
test/run/ToSort/Addon/Resources.php: // $this->disable();
test/run/ToSort/Addon/Resources.php: // $this->disable();
test/run/ToSort/Addon/Resources.php: // $this->disable();
test/run/ToSort/Addon/Resources.php: $lia->addResourceUrl('https://test.taeluf.com/'.$i.'.'.$ext);
test/run/ToSort/Addon/Resources.php: $scriptTags = $res->getUrlTag('js');
test/run/ToSort/Addon/Resources.php: $cssTags = $res->getUrlTag('css');
test/run/ToSort/Addon/Resources.php: $this->compare($tScripts, $scriptTags);
test/run/ToSort/Addon/Resources.php: $this->compare($tStyles, $cssTags);
test/run/ToSort/Addon/Resources.php: $cache->dir = $this->dir().'/cache/';
test/run/ToSort/Addon/Resources.php: $res->useCache = false;
test/run/ToSort/Addon/Resources.php: $filesDir = $this->dir().'/file/';
test/run/ToSort/Addon/Resources.php: $lia->addResourceFile($filesDir.'/'.$file);
test/run/ToSort/Addon/Resources.php: $jsFile = $res->compileFilesToCache('js');
test/run/ToSort/Addon/Resources.php: $cssFile = $res->compileFilesToCache('css');
test/run/ToSort/Addon/Resources.php: $scriptTag = $res->getFileTag('js');
test/run/ToSort/Addon/Resources.php: $cssTag = $res->getFileTag('css');
test/run/ToSort/Addon/Resources.php: $html = $lia->getHeadHtml();
test/run/ToSort/Addon/Resources.php: $this->compare($tHtml, $aHtml);
test/run/ToSort/Addon/Resources.php: $this->empty_dir($cache->dir);
test/run/ToSort/Addon/Resources.php: $this->disable();
test/run/ToSort/Addon/Resources.php: $lia->set('lia:resource.forceRecompile', true);
test/run/ToSort/Addon/Resources.php: $lia->set('lia:cache.dir', $this->cacheDir);
test/run/ToSort/Addon/Resources.php: $filesDir = $this->outDir;
test/run/ToSort/Addon/Resources.php: $lia->addResourceFile($filesDir.'/'.$file);
test/run/ToSort/Addon/Resources.php: $jsFile = $res->compileFilesToCache('js');
test/run/ToSort/Addon/Resources.php: $jsFile1 = $res->compileFilesToCache('js');
test/run/ToSort/Addon/Resources.php: $jsFile2 = $res->compileFilesToCache('js');
test/run/ToSort/Addon/Resources.php: $jsFile3 = $res->compileFilesToCache('js');
test/run/ToSort/Addon/Resources.php: $cssFile = $res->compileFilesToCache('css');
test/run/ToSort/Addon/Resources.php: $cssFile1 = $res->compileFilesToCache('css');
test/run/ToSort/Addon/Resources.php: $cssFile2 = $res->compileFilesToCache('css');
test/run/ToSort/Addon/Resources.php: $cssFile3 = $res->compileFilesToCache('css');
test/run/ToSort/Addon/Resources.php: && $this->compare($jsFile,$jsFile1)
test/run/ToSort/Addon/Resources.php: && $this->compare($jsFile1,$jsFile2)
test/run/ToSort/Addon/Resources.php: && $this->compare($jsFile2, $jsFile3)
test/run/ToSort/Addon/Resources.php: && $this->compare($cssFile, $cssFile1)
test/run/ToSort/Addon/Resources.php: && $this->compare($cssFile1, $cssFile2)
test/run/ToSort/Addon/Resources.php: && $this->compare($cssFile2, $cssFile3)
test/run/ToSort/Addon/Resources.php: $this->disable();
test/run/ToSort/Addon/Resources.php: $res = $lia->compo('lia:Resources');
test/run/ToSort/Addon/Resources.php: $package = $lia->getPackage('lia');
test/run/ToSort/Addon/Resources.php: $lia->addViewCallable('theme',
test/run/ToSort/Addon/Resources.php: $lia->set('lia:cache.dir', $this->cacheDir);
test/run/ToSort/Addon/Resources.php: $lia->set('lia:resource.forceRecompile', true);
test/run/ToSort/Addon/Resources.php: $lia->set('lia.Server.bufferResponse', false);
test/run/ToSort/Addon/Resources.php: $filesDir = $this->outDir;
test/run/ToSort/Addon/Resources.php: $lia->addResourceFile($filesDir.'/'.$file);
test/run/ToSort/Addon/Resources.php: $aRoute = $res->getCompiledFilesUrl('css');
test/run/ToSort/Addon/Resources.php: $lia->deliver($aRoute, "GET");
test/run/ToSort/Addon/Resources.php: && $this->compare(strlen($tStyles)>5, true, true)
test/run/ToSort/Addon/Resources.php: && $this->compare($tStyles, $aContent);
test/run/ToSort/Addon/Resources.php: $this->disable();
test/run/ToSort/Addon/Resources.php: $res = $lia->compo('Resources');
test/run/ToSort/Addon/Resources.php: $package = $lia->getPackage('lia');
test/run/ToSort/Addon/Resources.php: $lia->addViewCallable('theme',
test/run/ToSort/Addon/Resources.php: $lia->set('lia:cache.dir', $this->cacheDir);
test/run/ToSort/Addon/Resources.php: $lia->set('lia:resource.forceRecompile', true);
test/run/ToSort/Addon/Resources.php: $lia->set('lia.Server.bufferResponse', false);
test/run/ToSort/Addon/Resources.php: $filesDir = $this->outDir;
test/run/ToSort/Addon/Resources.php: $lia->addResourceFile($filesDir.'/'.$file);
test/run/ToSort/Addon/Resources.php: $aRoute = $res->getCompiledFilesUrl('js');
test/run/ToSort/Addon/Resources.php: $lia->deliver($aRoute, "GET");
test/run/ToSort/Addon/Resources.php: $this->compare(strlen($tScripts)>5, true, true);
test/run/ToSort/Addon/Resources.php: $this->compare($tScripts, $aContent);
test/run/ToSort/Addon/Resources.php: $cache->dir = $this->dir().'/cache/';
test/run/ToSort/Addon/Resources.php: $filesDir = $this->dir().'/file/';
test/run/ToSort/Addon/Resources.php: if (substr($file,-3)!='.js')continue;
test/run/ToSort/Addon/Resources.php: $lia->addResourceFile($filesDir.'/'.$file);
test/run/ToSort/Addon/Resources.php: $tFile = $res->compileFilesToCache('js');
test/run/ToSort/Addon/Resources.php: $this->compare(strlen($tScripts)>5, true, true);
test/run/ToSort/Addon/Resources.php: $this->compare($tScripts, file_get_contents($tFile));
test/run/ToSort/Addon/Resources.php: $this->empty_dir($this->dir().'/cache/');
test/run/ToSort/Addon/Resources.php: $lia->set('cache.dir', $this->dir().'/cache/');
test/run/ToSort/Addon/Resources.php: $filesDir = $this->dir().'/file/';
test/run/ToSort/Addon/Resources.php: if (substr($file,-4)!='.css')continue;
test/run/ToSort/Addon/Resources.php: $lia->addResourceFile($filesDir.'/'.$file);
test/run/ToSort/Addon/Resources.php: $tFile = $res->compileFilesToCache('css');
test/run/ToSort/Addon/Resources.php: $this->compare(strlen($tStyles)>5, true, true);
test/run/ToSort/Addon/Resources.php: $this->compare($tStyles, file_get_contents($tFile));
test/run/ToSort/Addon/Resources.php: $this->empty_dir($this->dir().'/cache/');
test/run/ToSort/Addon/Resources.php: $filesDir = $this->dir().'/file/';
test/run/ToSort/Addon/Resources.php: if (substr($file,-4)!='.css')continue;
test/run/ToSort/Addon/Resources.php: $lia->addResourceFile($filesDir.'/'.$file);
test/run/ToSort/Addon/Resources.php: $res->setSorter('css',
test/run/ToSort/Addon/Resources.php: $aStyles = $res->concatenateFiles('css');
test/run/ToSort/Addon/Resources.php: $this->compare(strlen($tStyles)>5, true, true);
test/run/ToSort/Addon/Resources.php: $this->compare($tStyles, $aStyles);
test/run/ToSort/Addon/Resources.php: $filesDir = $this->dir().'/file/';
test/run/ToSort/Addon/Resources.php: if (substr($file,-4)!='.css')continue;
test/run/ToSort/Addon/Resources.php: $lia->addResourceFile($filesDir.'/'.$file);
test/run/ToSort/Addon/Resources.php: $aStyles = $res->concatenateFiles('css');
test/run/ToSort/Addon/Resources.php: $this->compare(strlen($tStyles)>5, true, true);
test/run/ToSort/Addon/Resources.php: $this->compare($tStyles, $aStyles);
test/run/ToSort/Addon/Resources.php: $filesDir = $this->dir().'/file/';
test/run/ToSort/Addon/Resources.php: if (substr($file,-3)!='.js')continue;
test/run/ToSort/Addon/Resources.php: $lia->addResourceFile($filesDir.'/'.$file);
test/run/ToSort/Addon/Resources.php: $res->setSorter('js',
test/run/ToSort/Addon/Resources.php: $aScripts = $res->concatenateFiles('js');
test/run/ToSort/Addon/Resources.php: $this->compare(strlen($tScripts)>5, true, true);
test/run/ToSort/Addon/Resources.php: $this->compare($tScripts, $aScripts);
test/run/ToSort/Addon/Resources.php: $filesDir = $this->dir().'/file/';
test/run/ToSort/Addon/Resources.php: if (substr($file,-3)!='.js')continue;
test/run/ToSort/Addon/Resources.php: $lia->addResourceFile($filesDir.'/'.$file);
test/run/ToSort/Addon/Resources.php: $aScripts = $res->concatenateFiles('js');
test/run/ToSort/Addon/Resources.php: $this->compare(strlen($tScripts)>5, true, true);
test/run/ToSort/Addon/Resources.php: $this->compare($tScripts, $aScripts);
test/run/ToSort/Addon/Resources.php: return $this->cli->pwd . '/test/input/Resources/';
test/run/ToSort/Addon/ResourceSorter.php: $dir = $this->dir();
test/run/ToSort/Addon/ResourceSorter.php: $lia->addResourceFile($dir.$if);
test/run/ToSort/Addon/ResourceSorter.php: $lia->setResourceOrder('css',
test/run/ToSort/Addon/ResourceSorter.php: $resources = $res->getSortedFiles('css');
test/run/ToSort/Addon/ResourceSorter.php: && $this->test('Sorts files correctly')
test/run/ToSort/Addon/ResourceSorter.php: && $this->compare($target, $actualSorted)
test/run/ToSort/Addon/ResourceSorter.php: && $this->test('Has unsorted files, too')
test/run/ToSort/Addon/ResourceSorter.php: && $this->compare(6, count($resources))
test/run/ToSort/Addon/ResourceSorter.php: return $this->cli->pwd.'/test/input/ResourceSorter/';
test/run/ToSort/Addon/Error.php: return $this->cli->pwd.'/test/input/Views/';
test/run/ToSort/Addon/Error.php: $this->disable();
test/run/ToSort/Addon/Error.php: $lia->addRoute('/',function($req,$resp)use($routeContent){$resp->content = $routeContent;});
test/run/ToSort/Addon/Error.php: $lia->error_goto($errorMsg="Very generic error_goto message.");
test/run/ToSort/Addon/Error.php: $response = $lia->getResponse('/', 'GET');
test/run/ToSort/Addon/Error.php: $this->str_contains($response->content, $errorMsg);
test/run/ToSort/Addon/Error.php: $this->str_not_contains($response->content, $routeContent);
test/run/ToSort/Addon/Error.php: $this->disable();
test/run/ToSort/Addon/Error.php: $lia->addRoute('/',function($req,$resp)use($routeContent){$resp->content = $routeContent;});
test/run/ToSort/Addon/Error.php: $lia->error_page($errorMsg="Very generic error_page message.");
test/run/ToSort/Addon/Error.php: $response = $lia->getResponse('/', 'GET');
test/run/ToSort/Addon/Error.php: echo $response->content;
test/run/ToSort/Addon/Error.php: $this->str_contains($response->content, $errorMsg);
test/run/ToSort/Addon/Error.php: $this->str_not_contains($response->content, $routeContent);
test/run/ToSort/Addon/Error.php: $lia->addView('lia:theme', $this->view_dir());
test/run/ToSort/Addon/Error.php: $lia->addRoute('/',function($req,$resp)use($routeContent){$resp->content = $routeContent;});
test/run/ToSort/Addon/Error.php: $lia->error_header($errorMsg="Very generic error_header message.");
test/run/ToSort/Addon/Error.php: $response = $server->getResponse('/', 'GET');
test/run/ToSort/Addon/Error.php: $this->str_contains($response->content, $errorMsg);
test/run/ToSort/Addon/Error.php: $this->str_contains($response->content, $routeContent);
test/run/ToSort/Addon/Error.php: $this->test("Code $num");
test/run/ToSort/Addon/Error.php: $this->compare($text,$error->statusCodeText($num));
test/run/ToSort/Addon/Cache.php: $cache->dir = $this->cache_dir().'/stale-check/';
test/run/ToSort/Addon/Cache.php: $new_file_expiry = -1 * ( ($cache->stale_check_frequency * 60) + 3600 );
test/run/ToSort/Addon/Cache.php: // pre-clear the dir
test/run/ToSort/Addon/Cache.php: foreach (scandir($cache->dir) as $f){
test/run/ToSort/Addon/Cache.php: unlink($cache->dir.'/'.$f);
test/run/ToSort/Addon/Cache.php: $cache->cache_file($name=uniqid(), 'happy', time()+3600);
test/run/ToSort/Addon/Cache.php: $file_names[] = basename($cache->cache_file_path($name));
test/run/ToSort/Addon/Cache.php: $file_names[] = basename($cache->cache_meta_file_path($name));
test/run/ToSort/Addon/Cache.php: $kept_files[] = basename($cache->cache_file_path($name));
test/run/ToSort/Addon/Cache.php: $kept_files[] = basename($cache->cache_meta_file_path($name));
test/run/ToSort/Addon/Cache.php: $cache->cache_file($name=uniqid(), 'happy', time()+60);
test/run/ToSort/Addon/Cache.php: $file_names[] = basename($cache->cache_file_path($name));
test/run/ToSort/Addon/Cache.php: $file_names[] = basename($cache->cache_meta_file_path($name));
test/run/ToSort/Addon/Cache.php: $kept_files[] = basename($cache->cache_file_path($name));
test/run/ToSort/Addon/Cache.php: $kept_files[] = basename($cache->cache_meta_file_path($name));
test/run/ToSort/Addon/Cache.php: $file_names[] = basename($cache->cache_file_path($name));
test/run/ToSort/Addon/Cache.php: $file_names[] = basename($cache->cache_meta_file_path($name));
test/run/ToSort/Addon/Cache.php: $cache->cache_file($name, 'happy', $new_file_expiry);//it expired 5 seconds ago LOL
test/run/ToSort/Addon/Cache.php: $this->test('ensure new cache files are present');
test/run/ToSort/Addon/Cache.php: $real_files = scandir($cache->dir);
test/run/ToSort/Addon/Cache.php: $this->compare($file_names, $real_files);
test/run/ToSort/Addon/Cache.php: $cache->run_delete_stale_files();
test/run/ToSort/Addon/Cache.php: // verify cache files were deleted & that non-stale ones were kept
test/run/ToSort/Addon/Cache.php: $this->test('check that stale files were deleted & non-stale were kept');
test/run/ToSort/Addon/Cache.php: $real_files = scandir($cache->dir);
test/run/ToSort/Addon/Cache.php: $this->compare($kept_files, $real_files);
test/run/ToSort/Addon/Cache.php: $this->compare(6, count($kept_files));
test/run/ToSort/Addon/Cache.php: // post-clear the dir
test/run/ToSort/Addon/Cache.php: foreach (scandir($cache->dir) as $f){
test/run/ToSort/Addon/Cache.php: unlink($cache->dir.'/'.$f);
test/run/ToSort/Addon/Cache.php: $cache->set('dir', $dir=$this->cache_dir());
test/run/ToSort/Addon/Cache.php: $cache->cache_file($file_name='file-name', $file_content='i rarely know enough to form a real opinion.');
test/run/ToSort/Addon/Cache.php: $file_path = $cache->cache_file_path($file_name);
test/run/ToSort/Addon/Cache.php: $meta_path = $cache->cache_meta_file_path($file_name);
test/run/ToSort/Addon/Cache.php: $this->test('cached file stored successfully & retrieves as expected');
test/run/ToSort/Addon/Cache.php: $this->compare(true, $cache->is_cache_file_valid($file_name));
test/run/ToSort/Addon/Cache.php: $this->compare($file_path, $cache->get_cache_file_path($file_name));
test/run/ToSort/Addon/Cache.php: $this->compare($file_content,
test/run/ToSort/Addon/Cache.php: file_get_contents($cache->cache_file_path($file_name)));
test/run/ToSort/Addon/Cache.php: $this->compare($file_content,
test/run/ToSort/Addon/Cache.php: file_get_contents($cache->get_cache_file_path($file_name)));
test/run/ToSort/Addon/Cache.php: $this->compare($file_content,
test/run/ToSort/Addon/Cache.php: $cache->get_cache_file_content($file_name));
test/run/ToSort/Addon/Cache.php: $this->test('cached file unavailable if cache disabled');
test/run/ToSort/Addon/Cache.php: $cache->enabled = false;
test/run/ToSort/Addon/Cache.php: $this->compare(false, $cache->get_cache_file_path($file_name));
test/run/ToSort/Addon/Cache.php: $this->compare(false, $cache->is_cache_file_valid($file_name));
test/run/ToSort/Addon/Cache.php: $this->compare(true, file_exists($cache->cache_file_path($file_name)));
test/run/ToSort/Addon/Cache.php: $this->test('cached file unavailable if expired');
test/run/ToSort/Addon/Cache.php: $new_cache = json_encode(['expiry'=>time()-100]);
test/run/ToSort/Addon/Cache.php: $this->compare(false, $cache->get_cache_file_path($file_name));
test/run/ToSort/Addon/Cache.php: $this->compare(false, $cache->is_cache_file_valid($file_name));
test/run/ToSort/Addon/Cache.php: $this->compare(true, file_exists($cache->cache_file_path($file_name)));
test/run/ToSort/Addon/Cache.php: $this->test('cached file unavailable if file deleted');
test/run/ToSort/Addon/Cache.php: $cache->enabled = true;
test/run/ToSort/Addon/Cache.php: $this->compare(false, $cache->get_cache_file_path($file_name));
test/run/ToSort/Addon/Cache.php: $this->compare(false, $cache->is_cache_file_valid($file_name));
test/run/ToSort/Addon/Cache.php: $this->compare(false, file_exists($cache->cache_file_path($file_name)));
test/run/ToSort/Addon/Cache.php: * Tests $lia->cache() method & $lia->cache_get() method
test/run/ToSort/Addon/Cache.php: $cache->main = $main_file;
test/run/ToSort/Addon/Cache.php: $cache->dir = $this->cache_dir();
test/run/ToSort/Addon/Cache.php: // $cache->set('a.key', $target = 'some_value');
test/run/ToSort/Addon/Cache.php: $lia->cache('a.key', $target='some_value');
test/run/ToSort/Addon/Cache.php: $this->test('in memory');
test/run/ToSort/Addon/Cache.php: $this->compare(
test/run/ToSort/Addon/Cache.php: $cache->get('a.key')
test/run/ToSort/Addon/Cache.php: $this->compare(
test/run/ToSort/Addon/Cache.php: $lia->get('cache.a.key')
test/run/ToSort/Addon/Cache.php: $this->test('from disk');
test/run/ToSort/Addon/Cache.php: $cache->write();
test/run/ToSort/Addon/Cache.php: $cache->dir = $this->cache_dir();
test/run/ToSort/Addon/Cache.php: $cache->main = $main_file;
test/run/ToSort/Addon/Cache.php: $cache->read();
test/run/ToSort/Addon/Cache.php: $cache->dir = $this->cache_dir();
test/run/ToSort/Addon/Cache.php: $this->compare(
test/run/ToSort/Addon/Cache.php: $cache->get('a.key')
test/run/ToSort/Addon/Cache.php: $this->compare(
test/run/ToSort/Addon/Cache.php: $lia->cache_get('a.key')
test/run/ToSort/Addon/Cache.php: unlink($cache->main_file_path());
test/run/ToSort/Addon/Cache.php: * @tests caching via $lia->set('cache.a.key') & $lia->get('cache.a.key');
test/run/ToSort/Addon/Cache.php: * @tests $cache->get('a.key'); as well
test/run/ToSort/Addon/Cache.php: $cache->main = $main_file;
test/run/ToSort/Addon/Cache.php: $cache->dir = $this->cache_dir();
test/run/ToSort/Addon/Cache.php: // $cache->set('a.key', $target = 'some_value');
test/run/ToSort/Addon/Cache.php: $lia->set('cache.a.key', $target='some_value');
test/run/ToSort/Addon/Cache.php: $this->test('in memory');
test/run/ToSort/Addon/Cache.php: $this->compare(
test/run/ToSort/Addon/Cache.php: $cache->get('a.key')
test/run/ToSort/Addon/Cache.php: $this->compare(
test/run/ToSort/Addon/Cache.php: $lia->get('cache.a.key')
test/run/ToSort/Addon/Cache.php: $this->test('from disk');
test/run/ToSort/Addon/Cache.php: $cache->write();
test/run/ToSort/Addon/Cache.php: $cache->dir = $this->cache_dir();
test/run/ToSort/Addon/Cache.php: $cache->main = $main_file;
test/run/ToSort/Addon/Cache.php: $cache->read();
test/run/ToSort/Addon/Cache.php: $cache->dir = $this->cache_dir();
test/run/ToSort/Addon/Cache.php: $this->compare(
test/run/ToSort/Addon/Cache.php: $cache->get('a.key')
test/run/ToSort/Addon/Cache.php: $this->compare(
test/run/ToSort/Addon/Cache.php: $lia->get('cache.a.key')
test/run/ToSort/Addon/Cache.php: unlink($cache->main_file_path());
test/run/ToSort/Addon/Cache.php: * Uses $cache->set('a.key') & $cache->get('a.key');
test/run/ToSort/Addon/Cache.php: * @tests $cache->write() & $cache->read();
test/run/ToSort/Addon/Cache.php: $cache->main = $main_file;
test/run/ToSort/Addon/Cache.php: $cache->dir = $this->cache_dir();
test/run/ToSort/Addon/Cache.php: $cache->set('a.key', $target = 'some_value');
test/run/ToSort/Addon/Cache.php: $this->test('in memory');
test/run/ToSort/Addon/Cache.php: $this->compare(
test/run/ToSort/Addon/Cache.php: $cache->get('a.key')
test/run/ToSort/Addon/Cache.php: $this->test('from disk');
test/run/ToSort/Addon/Cache.php: $cache->write();
test/run/ToSort/Addon/Cache.php: $cache->dir = $this->cache_dir();
test/run/ToSort/Addon/Cache.php: $cache->main = $main_file;
test/run/ToSort/Addon/Cache.php: $cache->read();
test/run/ToSort/Addon/Cache.php: $cache->dir = $this->cache_dir();
test/run/ToSort/Addon/Cache.php: $this->compare(
test/run/ToSort/Addon/Cache.php: $cache->get('a.key')
test/run/ToSort/Addon/Cache.php: unlink($cache->main_file_path());
test/run/ToSort/Addon/Hook.php: $hooks->add('a.hook', function($input){echo "Input: $input"; return "V good";});
test/run/ToSort/Addon/Hook.php: $hooks->add('a.hook', function($input){echo "Uhhh: $input"; return "Vvvv good";});
test/run/ToSort/Addon/Hook.php: $ret = $hooks->call('a.hook', "input, silly");
test/run/ToSort/Addon/Hook.php: $this->compare(["V good", "Vvvv good"], $ret);
test/run/ToSort/Addon/Hook.php: $this->compare("Input: input, sillyUhhh: input, silly", $output);
test/run/ToSort/Addon/Router.Other.php: // $this->disable();
test/run/ToSort/Addon/Router.Other.php: // echo "This is not implemented currently, but the test-method is left here as a placeholder, as a note.";
test/run/ToSort/Addon/Router.Other.php: // $this->disable();
test/run/ToSort/Addon/Router.Other.php: // $this->disable();
test/run/ToSort/Addon/Router.Other.php: // $this->disable();
test/run/ToSort/Addon/Router.Other.php: // $this->disable();
test/run/ToSort/Addon/Router.Other.php: // $this->disable();
test/run/ToSort/Addon/Router.Other.php: // // echo "This is not implemented currently, but the test-method is left here as a placeholder, as a note.";
test/run/ToSort/Addon/Router.Other.php: $router->varDelim = '\\.\\/\\:';
test/run/ToSort/Addon/Router.Other.php: $lia->addRoute('/optional/{?checkingFor}/and/{required}/',
test/run/ToSort/Addon/Router.Other.php:// print_r($route->paramaters());
test/run/ToSort/Addon/Router.Other.php: return $route->param('checkingFor').'::'.$route->param('required');
test/run/ToSort/Addon/Router.Other.php: $route1 = $lia->route(new \Lia\Obj\Request('/optional/abc/and/the-required/'))[0];
test/run/ToSort/Addon/Router.Other.php: $callable1 = $route1->target();
test/run/ToSort/Addon/Router.Other.php: $this->compare('abc::the-required',$ret1);
test/run/ToSort/Addon/Router.Other.php: $route2 = $lia->route(new \Lia\Obj\Request('/optional/and/the-required/'))[0];
test/run/ToSort/Addon/Router.Other.php: $callable2 = $route2->target();
test/run/ToSort/Addon/Router.Other.php: $this->compare('::the-required',$ret2);
test/run/ToSort/Addon/Router.Other.php: // $this->disable();
test/run/ToSort/Addon/Router.Other.php: // $this->setup($lia,$router, $package);
test/run/ToSort/Addon/Router.Other.php: $router->varDelim = '\\.\\/\\:';
test/run/ToSort/Addon/Router.Other.php: // $this->lia = $lia;
test/run/ToSort/Addon/Router.Other.php: 'black-lives-matter'=> 'Have you looked at traffic data in your home town? Is there a racial disparity?',
test/run/ToSort/Addon/Router.Other.php: 'toxic-pollution' => 'The US EPA, under Trump, has rolled back many protections for U.S. citizens',
test/run/ToSort/Addon/Router.Other.php: 'us-voter-suppression' => 'Why are mailboxes and mail-sorting machines being removed from cities? Why isn\'t the post office tax-payer funded?',
test/run/ToSort/Addon/Router.Other.php: $var = $route->var(0);
test/run/ToSort/Addon/Router.Other.php: if ($route->part(0)=='about'
test/run/ToSort/Addon/Router.Other.php: else if ($route->part(0)=='blog'
test/run/ToSort/Addon/Router.Other.php: // $compo->autoRegisterScannedPrefixes($lia);
test/run/ToSort/Addon/Router.Other.php: $lia->scan('route', $compo);
test/run/ToSort/Addon/Router.Other.php: '/blog/black-lives-matter/',
test/run/ToSort/Addon/Router.Other.php: '/blog/toxic-pollution',
test/run/ToSort/Addon/Router.Other.php: '/blog/global-warming/',
test/run/ToSort/Addon/Router.Other.php: $aRoute = $lia->route(new \Lia\Obj\Request($url))[0];
test/run/ToSort/Addon/Router.Other.php: $this->compare($compo->routePatternBlog($route), ($aRoute->target())($aRoute));
test/run/ToSort/Addon/Router.Other.php: $t1 = $lia->route(new \Lia\Obj\Request('/blog/us-voter-suppression'))[0]->target();
test/run/ToSort/Addon/Router.Other.php: $a1 = $lia->route(new \Lia\Obj\Request('/blog/us-voter-suppression/'))[0]->target();
test/run/ToSort/Addon/Router.Other.php: $compo->lia = null;
test/run/ToSort/Addon/Router.Other.php: $this->compare_raw($t1,$a1);
test/run/ToSort/Addon/Router.Other.php: $this->compare([], $lia->route(new \Lia\Obj\Request('/ranked-choice-voting/')));
test/run/ToSort/Addon/Router.Other.php: $this->compare([], $lia->route(new \Lia\Obj\Request('/about/me')));
test/run/ToSort/Addon/Router.Other.php: // $this->setup($lia, $router, $package);
test/run/ToSort/Addon/Router.Other.php: $lia->addRoute(
test/run/ToSort/Addon/Router.Other.php: $aRouteList = $lia->route(new \Lia\Obj\Request($tUrl='/ban/toxic/chemicals/',$tMethod='POST'));
test/run/ToSort/Addon/Router.Other.php: $tReg = $router->url_to_regex($tUrl);
test/run/ToSort/Addon/Router.Other.php: $this->compare_raw($tRouteList, $aRouteList);
test/run/ToSort/Addon/Router.Other.php: // $this->setup($lia, $router, $package);
test/run/ToSort/Addon/Router.Other.php: '/one.two-three/four'=>'^\\/(?:one|\?)\\.(?:two|\?)\\-(?:three|\?)\\/(?:four|\?)$',
test/run/ToSort/Addon/Router.Other.php: '/-thing-/'=>'^\\/\\-(?:thing|\?)\\-\\/$',
test/run/ToSort/Addon/Router.Other.php: $actual = $router->url_to_regex($url);
test/run/ToSort/Addon/Router.Other.php: $this->test($url)
test/run/ToSort/Addon/Router.Other.php: ->compare($target, $actual);
test/run/ToSort/Addon/Router.Other.php: // $this->setup($lia, $router, $package);
test/run/ToSort/Addon/Router.Other.php: 'static'=>'/black-lives-matter/',
test/run/ToSort/Addon/Router.Other.php: ['/abc/def/{dynam}-{two}', '/abc/def/?-?', ['dynam','two']],
test/run/ToSort/Addon/Router.Other.php: $actual = $router->decode_pattern($r[0]);
test/run/ToSort/Addon/Router.Other.php: if (is_string($key))$this->test($key);
test/run/ToSort/Addon/Router.Other.php: $this->compare($t, $actual,true);
test/run/ToSort/Addon/Router.Other.php: // $this->disable();
test/run/ToSort/Addon/Router.Other.php: // while ($i++<100)$this->testPatternRouteMethod();
test/run/ToSort/Addon/Router.Other.php: // $this->disable();
test/run/ToSort/Addon/Router.Other.php: // while ($i++<100)$this->testGetRoute();
test/run/ToSort/Addon/Router.Other.php: // $this->disable();
test/run/ToSort/Addon/Router.Other.php: // while ($i++<100)$this->testUrlToTestReg();
test/run/ToSort/Addon/Router.Other.php: // $this->disable();
test/run/ToSort/Addon/Router.Other.php: // while ($i++<100)$this->testParsePatterns();
test/run/ToSort/Addon/Server.php: $server->useTheme = false;
test/run/ToSort/Addon/Server.php: $router->addRoute('/test/', [$this, 'sample_content']);
test/run/ToSort/Addon/Server.php: $response = $server->getResponse('/test/');
test/run/ToSort/Addon/Server.php: $this->compare('test-content', $response->content);
test/run/ToSort/Addon/Server.php: $view->addViewCallable('theme', [$this, 'theme_view']);
test/run/ToSort/Addon/Server.php: $router->addRoute('/test/', [$this, 'sample_content']);
test/run/ToSort/Addon/Server.php: $response = $server->getResponse('/test/');
test/run/ToSort/Addon/Server.php: $this->compare('<theme>test-content</theme>', $response->content);
test/run/ToSort/Addon/Server.php: return '<theme>'.$response->content.'</theme>';
test/run/ToSort/Addon/Server.php: $response->content = 'test-content';
test/run/ToSort/Addon/ViewOld.php: $v->addViewCallable('found', function(){return 'nah';});
test/run/ToSort/Addon/ViewOld.php: $this->catch('ErrorException')
test/run/ToSort/Addon/ViewOld.php: ->containing('Undefined index: not-found')
test/run/ToSort/Addon/ViewOld.php: $view = $v->view('not-found');
test/run/ToSort/Addon/ViewOld.php: $this->throw($e);
test/run/ToSort/Addon/ViewOld.php: $this->catch('Exception')
test/run/ToSort/Addon/ViewOld.php: ->containing('Undefined index: '.null)
test/run/ToSort/Addon/ViewOld.php: $view = $v->view('not-found');
test/run/ToSort/Addon/ViewOld.php: $this->throw($e);
test/run/ToSort/Addon/ViewOld.php: * @test Exception when there are no views for the requested non-null namespace
test/run/ToSort/Addon/ViewOld.php: $this->catch('Exception')
test/run/ToSort/Addon/ViewOld.php: ->containing('Undefined index: nons')
test/run/ToSort/Addon/ViewOld.php: $view = $v->view('nons:not-found');
test/run/ToSort/Addon/ViewOld.php: $this->throw($e);
test/run/ToSort/Addon/ViewOld.php: * @test that a null-namespace view() call will fallback to a namespaced view (when null-namespace view was not explicitly set)
test/run/ToSort/Addon/ViewOld.php: $v->addViewCallable('lia:theme', function(){return 'ok';});
test/run/ToSort/Addon/ViewOld.php: $output = $v->view('theme').'';
test/run/ToSort/Addon/ViewOld.php: $this->compare('ok', $output);
test/run/ToSort/Addon/ViewOld.php: $view_addon->conflictMode = 'overwrite';
test/run/ToSort/Addon/ViewOld.php: $lia->addViewCallable('lia:theme',
test/run/ToSort/Addon/ViewOld.php: $lia->addViewCallable('theme',$liaTheme);
test/run/ToSort/Addon/ViewOld.php: $lia->addViewCallable('wrong:theme',
test/run/ToSort/Addon/ViewOld.php: $lia->addViewCallable('theme',
test/run/ToSort/Addon/ViewOld.php: $anyNamespace = $lia->view('theme').'';
test/run/ToSort/Addon/ViewOld.php: $this->compare($phraseAny, $anyNamespace);
test/run/ToSort/Addon/ViewOld.php: $specificNamespace = $lia->view('lia:theme').'';
test/run/ToSort/Addon/ViewOld.php: $this->compare($phrase, $specificNamespace);
test/run/ToSort/Addon/ViewOld.php: $this->compare('view with wrong namespace', $lia->view('wrong:theme').'');
test/run/ToSort/Addon/ViewOld.php: $lia->addViewCallable('theme',
test/run/ToSort/Addon/ViewOld.php: $content = $lia->view('theme').'';
test/run/ToSort/Addon/ViewOld.php: $this->compare($phrase, $content);
test/run/ToSort/Addon/ViewOld.php: return $this->cli->pwd.'/test/input/Views/';
test/run/ToSort/Addon/View.php: * @test view loads nested resources (view-name.php also loads view-name/*.css & view-name/*.js)
test/run/ToSort/Addon/View.php: $dir = $this->view_dir_2();
test/run/ToSort/Addon/View.php: $view_handler->addView('nested', $dir);
test/run/ToSort/Addon/View.php: $output = $view_handler->view('nested');
test/run/ToSort/Addon/View.php: $this->compare('nested', $output);
test/run/ToSort/Addon/View.php: $this->compare(
test/run/ToSort/Addon/View.php: , $view_handler->props['resources']['files']
test/run/ToSort/Addon/View.php: * @test view loads sibling resources (view-name.php also loads view-name.css & view-name.js)
test/run/ToSort/Addon/View.php: $dir = $this->view_dir_2();
test/run/ToSort/Addon/View.php: $view_handler->addView('sibling', $dir);
test/run/ToSort/Addon/View.php: $output = $view_handler->view('sibling');
test/run/ToSort/Addon/View.php: $this->compare('sibling', $output);
test/run/ToSort/Addon/View.php: $this->compare(
test/run/ToSort/Addon/View.php: , $view_handler->lia->resources->files
test/run/ToSort/Addon/View.php: $file = $this->view_dir().'/test.php';
test/run/ToSort/Addon/View.php: $view->addView('lia:test', $this->view_dir_2());
test/run/ToSort/Addon/View.php: $this->compare(
test/run/ToSort/Addon/View.php: 'test-dir',
test/run/ToSort/Addon/View.php: $view->view('test'),
test/run/ToSort/Addon/View.php: $this->compare(
test/run/ToSort/Addon/View.php: 'test-dir',
test/run/ToSort/Addon/View.php: $view->view('lia:test'),
test/run/ToSort/Addon/View.php: $file = $this->view_dir().'/test.php';
test/run/ToSort/Addon/View.php: $view->addViewCallable('lia:test', function($view_name,$args){return 'test-call';});
test/run/ToSort/Addon/View.php: $this->compare(
test/run/ToSort/Addon/View.php: 'test-call',
test/run/ToSort/Addon/View.php: $view->view('test'),
test/run/ToSort/Addon/View.php: $this->compare(
test/run/ToSort/Addon/View.php: 'test-call',
test/run/ToSort/Addon/View.php: $view->view('lia:test'),
test/run/ToSort/Addon/View.php: $file = $this->view_dir().'/test.php';
test/run/ToSort/Addon/View.php: $view->addViewFile('lia:test', $file);
test/run/ToSort/Addon/View.php: $this->compare(
test/run/ToSort/Addon/View.php: $view->view('test'),
test/run/ToSort/Addon/View.php: $this->compare(
test/run/ToSort/Addon/View.php: $view->view('lia:test'),
test/run/ToSort/Addon/View.php: return realpath($this->cli->pwd.'/test/input/Views/').'/';
test/run/ToSort/Addon/View.php: return realpath($this->cli->pwd.'/test/input/Views2/').'/';
test/run/ToSort/BasePackage.php: * @note nov 18 2021: this is a sample of using the base package to craft a unified environment in a functional manner. There will be a Server package that ... basically wraps all of this up. First, I will probably write another test that does these same things, but via package hooks or something? Like using $addon->package_ready($package_dir) or something instead of scripting each addon's setup here. It's hard to tell rn
test/run/ToSort/BasePackage.php: // $package->dir('relative_path'); to get $package->dir.'/relative_path/'
test/run/ToSort/BasePackage.php: // $addon->package_ready(); get called by $package->package_ready();
test/run/ToSort/BasePackage.php: // in server package, the server package will call package_ready() so user-land code doesn't have to worry abou this.
test/run/ToSort/BasePackage.php: // maybe create another package subclass to include some of these basic features that are not server-specific
test/run/ToSort/BasePackage.php: // $addon->package_added() (or something) for first-hand initiation (though __construct can be overridden to achieve this. So it might just be silly fodder.
test/run/ToSort/BasePackage.php: $package->dir = $this->package_dir();
test/run/ToSort/BasePackage.php: $package->load_addons('addon');
test/run/ToSort/BasePackage.php: $package->addons['autoload']->enable();
test/run/ToSort/BasePackage.php: $package->autoload($package->dir.'/class', 'Lia\Test\Package');
test/run/ToSort/BasePackage.php: $this->compare($class_name, get_class($somethin));
test/run/ToSort/BasePackage.php: // $package->not_a_method();
test/run/ToSort/BasePackage.php: $package->set('cache.dir', $package->dir.'/cache/');
test/run/ToSort/BasePackage.php: $package->addons['cache']->create_dir($package->get('cache.dir'));
test/run/ToSort/BasePackage.php: $package->cache('a.key', 'value');
test/run/ToSort/BasePackage.php: $unfile = $package->addons['cache']->main_file_path();
test/run/ToSort/BasePackage.php: $package->cache_write();
test/run/ToSort/BasePackage.php: $package->cache_read();
test/run/ToSort/BasePackage.php: $this->compare('value', $package->cache_get('a.key'));
test/run/ToSort/BasePackage.php: $unfile=$package->addons['cache']->cache_file_path('abc');
test/run/ToSort/BasePackage.php: $package->cache_file('abc', 'some-value');
test/run/ToSort/BasePackage.php: $this->compare('some-value', $package->cache_get_file('abc'));
test/run/ToSort/BasePackage.php: $package->hook('a.thing', function(){return 'ok';});
test/run/ToSort/BasePackage.php: $ret = $package->call_hook('a.thing');
test/run/ToSort/BasePackage.php: $this->compare(['ok'], $ret);
test/run/ToSort/BasePackage.php: return $this->cli->pwd.'/test/input/AppPackage';
test/run/ToSort/ExceptionCatcher.php: $ns = 'catch-test';
test/run/ToSort/ExceptionCatcher.php: $lia->addMethod('xyz', function(){return 'xyz';});
test/run/ToSort/ExceptionCatcher.php: $lia->addMethod($ns.'.def', function(){return 'def';});
test/run/ToSort/ExceptionCatcher.php: $lia->addMethod($ns.'.addon.abc', function(){return 'abc';});
test/run/ToSort/ExceptionCatcher.php: $addon->$method_name();
test/run/ToSort/ExceptionCatcher.php: $this->str_contains($output, "Message: Api method `${method_name}` does note exist on Lia");
test/run/ToSort/ExceptionCatcher.php: $this->str_contains($output, '- File: ' . __FILE__);
test/run/ToSort/ExceptionCatcher.php: $this->str_contains($output, '- Line: '. $line);
test/run/ToSort/ExceptionCatcher.php: $this->str_contains($output, '- Function: __call');
test/run/ToSort/Liaison.php: $this->disable();
test/run/ToSort/Liaison.php: $ns = 'methods-test';
test/run/ToSort/Liaison.php: $lia->addMethod('xyz', function(){return 'xyz';});
test/run/ToSort/Liaison.php: $lia->addMethod($ns.'.def', function(){return 'def';});
test/run/ToSort/Liaison.php: $lia->addMethod($ns.'.addon.abc', function(){return 'abc';});
test/run/ToSort/Liaison.php: $this->compare('xyz', $addon->_api('xyz'));
test/run/ToSort/Liaison.php: $this->compare('def', $addon->_api($ns.'.def'));
test/run/ToSort/Liaison.php: $this->compare('abc', $addon->_api($ns.'.addon.abc'));
test/run/ToSort/Liaison.php: $this->compare('xyz', $package->_api('xyz'));
test/run/ToSort/Liaison.php: $this->compare('def', $package->_api($ns.'.def'));
test/run/ToSort/Liaison.php: $this->compare('abc', $package->_api($ns.'.addon.abc'));
test/run/ToSort/Liaison.php: $this->compare('xyz', $lia->_api('xyz'));
test/run/ToSort/Liaison.php: $this->compare('def', $lia->_api($ns.'.def'));
test/run/ToSort/Liaison.php: $this->compare('abc', $lia->_api($ns.'.addon.abc'));
test/run/ToSort/Liaison.php: $this->compare ('xyz', $package->_lia->xyz());
test/run/ToSort/Liaison.php: $this->compare('xyz', $package->lia->xyz());
test/run/ToSort/Liaison.php: $this->compare('xyz', $addon->lia->lia->xyz());
test/run/ToSort/Liaison.php: $this->compare('xyz', $addon->_lia->xyz());
test/run/ToSort/Liaison.php: $this->compare('def', $addon->lia->def());
test/run/ToSort/Liaison.php: $this->disable();
test/run/ToSort/Liaison.php: $ns = 'methods-test';
test/run/ToSort/Liaison.php: $lia->addMethod($ns.'.addon.abc', function(){return 'abc';});
test/run/ToSort/Liaison.php: $this->compare('abc', $addon->abc());
test/run/ToSort/Liaison.php: $this->compare('abc',$package->methods['addon']['abc']());
test/run/ToSort/Liaison.php: $this->compare('abc',$package->api('addon.abc'));
test/run/ToSort/Liaison.php: $this->compare('abc',$lia->methods[$ns]['addon']['abc']());
test/run/ToSort/Liaison.php: $this->compare('abc',$lia->api($ns.'.addon.abc'));
test/run/ToSort/Liaison.php: $lia->addMethod($ns.'.def', function(){return 'def';});
test/run/ToSort/Liaison.php: $this->compare('def',$package->def());
test/run/ToSort/Liaison.php: $this->compare('def', $lia->api($ns.'.def'));
test/run/ToSort/Liaison.php: $this->disable();
test/run/ToSort/Liaison.php: $ns = 'methods-test';
test/run/ToSort/Liaison.php: $addon->addMethod('abc', function(){return 'abc';});
test/run/ToSort/Liaison.php: $this->compare('abc', $addon->abc());
test/run/ToSort/Liaison.php: $this->compare('abc',$package->methods['addon']['abc']());
test/run/ToSort/Liaison.php: $this->compare('abc',$package->api('addon.abc'));
test/run/ToSort/Liaison.php: $this->compare('abc',$lia->methods[$ns]['addon']['abc']());
test/run/ToSort/Liaison.php: $this->compare('abc',$lia->api($ns.'.addon.abc'));
test/run/ToSort/Liaison.php: $package->addMethod('def', function(){return 'def';});
test/run/ToSort/Liaison.php: $this->compare('def',$package->def());
test/run/ToSort/Liaison.php: $this->compare('def', $lia->api($ns.'.def'));
test/run/ToSort/Liaison.php: $this->disable();
test/run/ToSort/Liaison.php: $ns = 'test-ns';
test/run/ToSort/Liaison.php: $this->compare_raw($package->addons, ['package'=>$package, 'addon'=>$addon]);
test/run/ToSort/Liaison.php: $this->compare_raw($package, $lia->addons[$ns]['package']);
test/run/ToSort/Liaison.php: $this->compare_raw($addon, $lia->addons[$ns]['addon']);
test/run/ToSort/Liaison.php: $this->compare_raw(
test/run/ToSort/Liaison.php: $lia->addons
test/run/ToSort/Liaison.php: $this->disable();
test/run/ToSort/Liaison.php: $this->compare_raw(
test/run/ToSort/Liaison.php: $lia->addons
test/run/ToSort/Liaison.php: $package->set('something', 'value');
test/run/ToSort/Liaison.php: $this->compare(
test/run/ToSort/Liaison.php: $lia->props,
test/run/ToSort/Liaison.php: $addon->set('something', 'value');
test/run/ToSort/Liaison.php: $lia->set('ns.addon.something', 'new_value');
test/run/ToSort/Liaison.php: $this->compare(
test/run/ToSort/Liaison.php: $lia->props,
test/run/ToSort/Liaison.php: $this->compare('new_value', $lia->props['ns']['addon']['something']);
test/run/ToSort/Liaison.php: $this->compare('new_value', $package->props['addon']['something']);
test/run/ToSort/Liaison.php: $this->compare('new_value', $addon->props['something']);
test/run/ToSort/Liaison.php: $addon->set('something', 'value');
test/run/ToSort/Liaison.php: $lia->set('ns.addon.something', 'new_value');
test/run/ToSort/Liaison.php: $this->compare(
test/run/ToSort/Liaison.php: $lia->props,
test/run/ToSort/Liaison.php: $this->compare('new_value', $lia->get('ns.addon.something'));
test/run/ToSort/Liaison.php: $this->compare('new_value', $package->get('addon.something'));
test/run/ToSort/Liaison.php: $this->compare('new_value', $addon->get('something'));
test/run/ToSort/Liaison.php: $addon->set('something', 'value');
test/run/ToSort/Liaison.php: $this->compare(
test/run/ToSort/Liaison.php: $lia->props,
test/run/ToSort/OldTests.php: require_once($this->cli->pwd.'/test/input/Hook/Sample.php');
test/run/ToSort/OldTests.php: $sample->onHook_Test();
test/run/ToSort/OldTests.php: $hooks->call('hook.test');
test/run/ToSort/OldTests.php: $this->compare(
test/run/ToSort/Prefixes.php: require_once($this->cli->pwd.'/test/input/Hook/Sample.php');
test/run/ToSort/Prefixes.php: $lia->scan('on', $sample);
test/run/ToSort/Prefixes.php: $sample->onHook_Test();
test/run/ToSort/Prefixes.php: $hooks->call('hook.test');
test/run/ToSort/Prefixes.php: $this->compare(
test/run/ToSort/Server.php: * Test the fully-functional server
test/run/ToSort/Server.php: $out = $this->get('/dynamic/babybears/?no_theme=true');
test/run/ToSort/Server.php: * @bug(dec-15-2021) all my requests are delivering to the built-in liaison theme, not to the theme for the site. I noticed this issue in taeluf.com
test/run/ToSort/Server.php: * @option 1: always overwrite the null-namespace when adding a new view
test/run/ToSort/Server.php: * @option 4: Add a config for overwriting null-namespace when adding a new view
test/run/ToSort/Server.php: * @solution option 1, always overwrite null-namespace when adding a new view. If you want the other view, it can be used explicitly.
test/run/ToSort/Server.php: $response = $this->get('/');
test/run/ToSort/Server.php: $this->str_contains($response, '<!-- TEST THEME -->');
test/run/ToSort/Server.php: * @bug(dec-15-2021) delivering static files works, but doing so through the Resources class does not. Getting a class 'Lia\Exception' not found in StaticFile.php line 104. I removed the Lia\Exceptions for \Exceptions. staticFile is receiving a file path that ends with '.file' because that's how I re-designed the cache class. I added a `$type` param to the static file class constructor & made minor modifications so mime-type is derived from this $type param, if given.
test/run/ToSort/Server.php: $this->empty_dir($this->file('test/Server/cache/'));
test/run/ToSort/Server.php: $url = $this->get('/add-resource-file/');
test/run/ToSort/Server.php: $css = $this->get($url);
test/run/ToSort/Server.php: $this->str_contains($css,'.css{background:blue;}');
test/run/ToSort/Server.php: $this->empty_dir($this->file('test/Server/cache/'));
test/run/ToSort/Server.php: $response = $this->get('/sample.css');
test/run/ToSort/Server.php: $this->str_contains(
test/run/ToSort/Server.php: $response = $this->get('/');
test/run/ToSort/Server.php: $this->str_contains(
test/run/ToSort/AddonStructure.php: 'autoload'=> $server->addons['autoload'],
test/run/ToSort/AddonStructure.php: 'cache'=> $server->addons['cache'],
test/run/ToSort/AddonStructure.php: 'error'=> $server->addons['error'],
test/run/ToSort/AddonStructure.php: 'hook'=> $server->addons['hook'],
test/run/ToSort/AddonStructure.php: 'resourcesorter'=> $server->addons['resourcesorter'],
test/run/ToSort/AddonStructure.php: 'resources'=> $server->addons['resources'],
test/run/ToSort/AddonStructure.php: 'router'=> $server->addons['router'],
test/run/ToSort/AddonStructure.php: 'server'=> $server->addons['server'],
test/run/ToSort/AddonStructure.php: 'seo'=> $server->addons['seo'],
test/run/ToSort/AddonStructure.php: 'view'=> $server->addons['view'],
test/run/ToSort/AddonStructure.php: $router = $lia->addons['server']['router'];
test/run/ToSort/AddonStructure.php: $this->compare($server->addons['router'],$router);
test/run/ToSort/AddonStructure.php: $this->compare_arrays($addons, $lia->addons);
test/run/ToSort/AddonStructure.php: $this->test("Liaison alone");
test/run/ToSort/AddonStructure.php: $this->compare_arrays($t_lia, $lia->addons);
test/run/ToSort/AddonStructure.php: $this->test("With One Package");
test/run/ToSort/AddonStructure.php: $this->compare_arrays($t_pack, $package->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays($t_lia, $lia->addons);
test/run/ToSort/AddonStructure.php: $this->test("With Two Packages");
test/run/ToSort/AddonStructure.php: $this->compare_arrays($t_pack, $package->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays($t_pack2, $package2->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays($t_lia, $lia->addons);
test/run/ToSort/AddonStructure.php: $this->test("With 2 addons in each package");
test/run/ToSort/AddonStructure.php: $this->compare_arrays($t_lia, $lia->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays($t_pack1, $package->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays($t_pack2, $package2->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays(['package'=>$package], $package->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays(['package'=>$package, 'view'=>$view], $view->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays(['package'=>$package, 'view'=>$view], $package->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays(['package'=>$package, 'view'=>$view, 'hook'=>$hook], $view->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays(['package'=>$package, 'view'=>$view, 'hook'=>$hook], $hook->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays(['package'=>$package, 'view'=>$view, 'hook'=>$hook], $package->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays(['view'=>$view], $view->addons);
test/run/ToSort/AddonStructure.php: $this->compare_arrays(['view'=>$view, 'hook'=>$hook], $view->addons, true);
test/run/ToSort/Documentation.php: * They are tests in order to be verifiable - not in order to actually test features.
test/run/ToSort/Documentation.php: $view_addon = $server->addons['view'];
test/run/ToSort/Documentation.php: $view_addon->views['server'] = [];
test/run/ToSort/Documentation.php: $lia->addViewCallable('server:theme', function(){return "abc";});
test/run/ToSort/Documentation.php: // $view_addon->views['server']['theme'] = $view_addon->views['mysite']['theme'];
test/run/ToSort/Documentation.php: $this->compare('abc', $lia->view('theme'));
test/run/ToSort/Documentation.php: $this->compare('abc', $lia->view('server:theme'));
test/run/ToSort/Documentation.php: $this->compare('abc', $lia->view(':theme'));
test/run/ToSort/Documentation.php: 'autoload'=> $server->addons['autoload'],
test/run/ToSort/Documentation.php: 'cache'=> $server->addons['cache'],
test/run/ToSort/Documentation.php: 'error'=> $server->addons['error'],
test/run/ToSort/Documentation.php: 'hook'=> $server->addons['hook'],
test/run/ToSort/Documentation.php: 'resourcesorter'=> $server->addons['resourcesorter'],
test/run/ToSort/Documentation.php: 'resources'=> $server->addons['resources'],
test/run/ToSort/Documentation.php: 'router'=> $server->addons['router'],
test/run/ToSort/Documentation.php: 'seo'=> $server->addons['seo'],
test/run/ToSort/Documentation.php: 'server'=> $server->addons['server'],
test/run/ToSort/Documentation.php: 'view'=> $server->addons['view'],
test/run/ToSort/Documentation.php: $router = $lia->addons['server']['router'];
test/run/ToSort/Documentation.php: $this->compare($server->addons['router'],$router);
test/run/ToSort/Documentation.php: $this->compare_arrays($addons, $lia->addons);
test/run/ToSort/QualityOfLife.php: * @note(12-16-2021) tests new quality of life features
test/run/ToSort/QualityOfLife.php: * @test $lia->addon(fqn) with no package & with package as root lia
test/run/ToSort/QualityOfLife.php: $this->test('no package');
test/run/ToSort/QualityOfLife.php: $actual = $target->addon('lia:server.cache');
test/run/ToSort/QualityOfLife.php: $this->compare_objects($target, $actual);
test/run/ToSort/QualityOfLife.php: $this->test('default package');
test/run/ToSort/QualityOfLife.php: $actual = $package->addon('lia:server.cache');
test/run/ToSort/QualityOfLife.php: $this->compare_objects($target, $actual);
test/run/ToSort/QualityOfLife.php: * I want to access addons by a fully-qualified name
test/run/ToSort/QualityOfLife.php: * @option 1 declare ->fqn string on every addon. create an ->fqn array on lia & have addons automatically add themselves to lia->fqn[$addon->fqn];
test/run/ToSort/QualityOfLife.php: * @option 2 addons declare ->namespace like 'lia', ->package like 'server'
test/run/ToSort/QualityOfLife.php: * @option 1.5 addon->fqn = 'lia:server.cache'; & lia->addons['lia:server.cache'] = cache_addon
test/run/ToSort/QualityOfLife.php: * I have a problem, which is ... addon nesting. I can't have lia->addons['lia:server.cache'] and lia->addons['server'] AND copy the fqn addons
test/run/ToSort/QualityOfLife.php: * lia->fqn_addons[addon->fqn]
test/run/ToSort/QualityOfLife.php: * $lia->addon(fqn) gets from fqn_addons
test/run/ToSort/QualityOfLife.php: * addon->namespace = lia:server
test/run/ToSort/QualityOfLife.php: * addon->name = cache
test/run/ToSort/QualityOfLife.php: * $lia->fqn_addons[addon->namespace . addon->cache] = $addon
test/run/ToSort/QualityOfLife.php: * @test getting addon via `$lia->addon('lia:server.cache')` (testing fully-qualified-names)
test/run/ToSort/QualityOfLife.php: $target = $target_server->addons['cache'];
test/run/ToSort/QualityOfLife.php: $actual = $lia->addon('lia:server.cache');
test/run/ToSort/QualityOfLife.php: $this->compare_objects($target, $actual);
test/run/ToSort/QualityOfLife.php: $actual = $target_server->addon('lia:server.cache');
test/run/ToSort/QualityOfLife.php: $this->compare_objects($target, $actual);
test/run/ToSort/QualityOfLife.php: $actual = $target->addon('lia:server.cache');
test/run/ToSort/QualityOfLife.php: $this->compare_objects($target, $actual);
test/run/ToSort/QualityOfLife.php: * @test ability to get addons via `$lia->addon_name`, including nested like `$lia->addon_name->sub_addon_name`
test/run/ToSort/QualityOfLife.php: $actual_server = $lia->server;
test/run/ToSort/QualityOfLife.php: $this->compare_objects($target_server, $actual_server);
test/run/ToSort/QualityOfLife.php: $target_views = $target_server->addons['view'];
test/run/ToSort/QualityOfLife.php: $actual_views = $target_server->view;
test/run/ToSort/QualityOfLife.php: $this->compare_objects($target_views, $actual_views);
test/run/ToSort/QualityOfLife.php: $actual_views = $lia->server->view;
test/run/ToSort/QualityOfLife.php: $this->compare_objects($target_views, $actual_views);
test/run/ToSort/ServerPackage.php: $main = new \Lia\Package\Server($lia, 'main', $this->file('test/Server/'));
test/run/ToSort/ServerPackage.php: $this->compare('value', $main->props['sample_config']);
test/run/ToSort/Bugs.php: * @bug(dec-16-2021) the 'lia' object being passed to views is NOT the root lia object. Could not re-produce issue in test. This bug originated in taeluf.com
test/run/ToSort/Bugs.php: $test = new \Lia\Package\Server($lia, 'test', $this->file('test/Server/'));
test/run/ToSort/Bugs.php: $target = get_class($lia).'#'.spl_object_id($lia).'#addon-count('.count($lia->addons).')';
test/run/ToSort/Bugs.php: $actual = $lia->view('wrong-lia').'';
test/run/ToSort/Bugs.php: $this->compare($target, $actual);
test/run/ToSort/Bugs.php: * This test FAILED to re-create the bug. So I realized that resource files were being added AFTER the theme view was being `require`d. I moved the code around & now it works. I have not added a test for this.
test/run/ToSort/Bugs.php: $this->empty_dir($this->file('test/Server/cache/'));
test/run/ToSort/Bugs.php: $response = $this->get('/nest-res/');
test/run/ToSort/Bugs.php: $css = $this->get($css_url);
test/run/ToSort/Bugs.php: $js = $this->get($js_url);
test/run/ToSort/Bugs.php: $this->test('compiled css');
test/run/ToSort/Bugs.php: $this->str_contains($css, ['.one{}','.two{}']);
test/run/ToSort/Bugs.php: $this->test('compiled js');
test/run/ToSort/Bugs.php: $this->str_contains($js, ['var one;','var two;']);
test/run/ToSort/Bugs.php: $this->empty_dir($this->file('test/Server/cache/'));
test/run/ToSort/Bugs.php: * @fixed by doing: `$this->props[$this->addon_name] = $this->props[$this->addon_name] ?? [];` instead of just `$this->props[$this->addon_name] = [];`
test/run/ToSort/Bugs.php: $dir = $this->file('input/Bugs/cache/');
test/run/ToSort/Bugs.php: $lia->set('server.cache.dir', $dir);
test/run/ToSort/Bugs.php: $this->compare($dir, $lia->addons['server']['cache']->dir);
test/run/ToSort.php: $view->addView('global-args', $this->file('test/input/ToSort/views/'));
test/run/ToSort.php: $view->globalArgs['glb_arg'] = $target = 'This is a global arg';
test/run/ToSort.php: $this->compare($target, $view->view('global-args'));
test/run/unit/FastFileRouter.php: $this->disable();
test/run/unit/FastFileRouter.php: $css = $this->get('/test.css');
test/run/unit/FastFileRouter.php: $this->compare('.css{background:blue;}',$css);
test/run/unit/FastFileRouter.php: $response = $this->get('/getme/?bears=the%20cutest');
test/run/unit/FastFileRouter.php: $this->compare('the cutest', $response);
test/run/unit/FastFileRouter.php: $response = $this->get('/fastroute/');
test/run/unit/FastFileRouter.php: $this->compare('this answers `/fastroute/`', $response);
test/run/unit/FastFileRouter.php: $response = $this->get('/fastroute../?okay');
test/run/unit/FastFileRouter.php: $this->compare('this answers `/fastroute/`', $response);
test/run/unit/FastFileRouter.php: $response = $this->get('/fastroute/');
test/run/unit/FastFileRouter.php: $this->compare('this answers `/fastroute/`', $response);
test/run/unit/Benchmark.php: $obj->dependency = $dep;
test/run/unit/Benchmark.php: while ($i++<$this->loop_count){
test/run/unit/Benchmark.php: $out = $obj->call_stuff($i);
test/run/unit/Benchmark.php: $obj->dependency = $dep;
test/run/unit/Benchmark.php: while ($i++<$this->loop_count){
test/run/unit/Benchmark.php: $out = $obj->do_stuff($i);
test/run/unit/Benchmark.php: $obj->methods['abc'] = [$dep, 'abc'];
test/run/unit/Benchmark.php: $obj->methods['def'] = [$dep, 'def'];
test/run/unit/Benchmark.php: while ($i++<$this->loop_count){
test/run/unit/Benchmark.php: $out = $obj->do_stuff($i);
test/run/unit/Benchmark.php: $obj->methods['abc'] = $abc;
test/run/unit/Benchmark.php: $obj->methods['def'] = $def;
test/run/unit/Benchmark.php: while ($i++<$this->loop_count){
test/run/unit/Benchmark.php: $obj->do_stuff($i);
test/run/unit/Benchmark.php: while ($i++<$this->loop_count){
test/run/unit/Benchmark.php: $obj->dependency = $dep;
test/run/unit/Benchmark.php: while ($i++<$this->loop_count){
test/run/unit/Benchmark.php: $obj->methods['abc'] = [$dep, 'abc'];
test/run/unit/Benchmark.php: $obj->methods['def'] = [$dep, 'def'];
test/run/unit/Benchmark.php: while ($i++<$this->loop_count){
test/run/unit/Benchmark.php: $obj->methods['abc'] =
test/run/unit/Benchmark.php: $obj->methods['def'] =
test/run/unit/Benchmark.php: $abc = $this->dependency->abc($i);
test/run/unit/Benchmark.php: $def = $this->dependency->def($i);
test/run/unit/Benchmark.php: return $abc . '-' . $def;
test/run/unit/Benchmark.php: $abc = $this->abc($i);
test/run/unit/Benchmark.php: $def = $this->def($i);
test/run/unit/Benchmark.php: return $this->dependency->$method(...$args);
test/run/unit/Benchmark.php: $abc = $this->abc($i);
test/run/unit/Benchmark.php: $def = $this->def($i);
test/run/unit/Benchmark.php: return $abc . '-' . $def;
test/run/unit/Benchmark.php: return $this->methods[$method](...$props);
test/run/ServerMinimal.php: $content = $this->get('/cat/', [], "1");
test/run/ServerMinimal.php: $this->str_contains($content,
test/run/ServerMinimal.php: '<link rel="stylesheet" href="/lia-resource.',
test/run/ServerMinimal.php: $content = $this->get('/',[], "1");
test/run/ServerMinimal.php: $this->str_contains($content,
test/ServerMinimal/view/theme.php:<?=$this->getHeadHtml()?>
test/ServerMinimal/cache/lia.resource.cssFileMap.file:{"\/home\/reed\/data\/owner\/Reed\/projects\/php\/Liaison\/test\/ServerMinimal\/view\/ArticlePreview.css":"lia-resource.6250768b10d19.min.css"}
test/ServerMinimal/add-route.php:$lia->addRoute('/{article}/',
test/ServerMinimal/add-route.php: $slug = $route->param('article');
test/ServerMinimal/add-route.php: $view = $lia->view('ArticlePreview', $articles[$slug]);
test/ServerMinimal/add-route.php: $response->content = $view;
test/ServerMinimal/deliver.php:require(__DIR__.'/add-route.php');
test/ServerMinimal/deliver.php:$lia->deliver();
test/Server/deliver.php:$lia->props['site']['dir'] = __DIR__;
test/Server/deliver.php:$lia->props['server']['cache']['dir'] = __DIR__.'/cache/';
test/Server/deliver.php: $lia->set('server.server.useTheme', false);
test/Server/deliver.php:$lia->deliver();
test/Server/public/add-resource-file.php:$lia->addResourceFile(dirname(__DIR__).'/file/test.css');
test/Server/public/add-resource-file.php:// $url = $lia->addons['server']['resources']->getFile
test/Server/public/add-resource-file.php:$url = $lia->addons['server']->addons['resources']->getCompiledFilesUrl('css');
test/Server/public/nest-res.php:echo $lia->view('nest-res');
test/Server/view/theme.php:<?=$this->getHeadHtml()?>
test/Server/view/theme.php:<!-- TEST THEME -->
test/Server/view/wrong-lia.php:echo get_class($lia).'#'.spl_object_id($lia).'#addon-count('.count($lia->addons).')';
.docsrc/History/2021-Question-Component.src.md:---
.docsrc/History/2021-Question-Component.src.md:- Views
.docsrc/History/2021-Question-Component.src.md: - Page (view the question & all of it's answers)
.docsrc/History/2021-Question-Component.src.md: - Compose (Create/Edit a question)
.docsrc/History/2021-Question-Component.src.md: - List (To show multiple questions on an 'Office' or 'Candi' page)
.docsrc/History/2021-Question-Component.src.md: - or does this go in Office?
.docsrc/History/2021-Question-Component.src.md: - ListItem (that which is shown in the list)
.docsrc/History/2021-Question-Component.src.md:- RDBModel
.docsrc/History/2021-Question-Component.src.md:- Schema (defined by Views/Compose)
.docsrc/History/2021-Question-Component.src.md:- Routes
.docsrc/History/2021-Question-Component.src.md:- Backed-up-db (would this go in the component?)
.docsrc/History/2021-Question-Component.src.md:- PHP helper code, as needed
.docsrc/History/2021-Question-Component.src.md:- view
.docsrc/History/2021-Question-Component.src.md:- class
.docsrc/History/2021-Question-Component.src.md:The routes would be set via the public-dir. The `submit` script would become '$this->component('Question')->submit($_POST);`
.docsrc/History/2021-Question-Component.src.md:2) How do I tell Liaison to deliver the `Compose` view at `/question/(question-slug:question-id)?/(\?office_id=office-id)?`
.docsrc/History/2021-Question-Component.src.md:3) How do I tell Liaison (& other parts of the component) that the submit-url is `/question/submit/`?
.docsrc/History/2021-Question-Component.src.md:4) How do I specify a base-url for the compoment?
.docsrc/History/2021-Question-Component.src.md: * - FILE_CHAR URL_CHAR USE
.docsrc/History/2021-Question-Component.src.md: * - . /
.docsrc/History/2021-Question-Component.src.md: * - @ @POST, @GET... specify valid request types
.docsrc/History/2021-Question-Component.src.md: * - [] OPTIONAL url paramater. EACH [\_a-zA-Z]+ becomes same-name PHP variable. [^\_a-zA-Z]+ uses standard character-substitution (like `.` replaced with `/`)
.docsrc/History/2021-Question-Component.src.md: * - () REQUIRED url paramater. Otherwise SAME AS `[]`
.docsrc/History/2021-Question-Component.src.md: Example url: /city-council/mayor/
.docsrc/History/2021-Question-Component.src.md: a) $office = city-council && $position = mayor
.docsrc/History/2021-Question-Component.src.md: b) OR $officePosition = city-council/mayor
.docsrc/History/2021-Question-Component.src.md: - `Public/` - Place files in the public directory with the naming convention below
.docsrc/History/2021-Question-Component.src.md: - `Route/` - Every `php` file will be `include`d & `$route` object can be called to create routes
.docsrc/History/2021-Question-Component.src.md: - `Task/` - A task can be registered to run & tasks can basically do anything
.docsrc/History/2021-Question-Component.src.md: - `/init.php` - `init.php` is `include`d every time a component is loaded & can do anything
.docsrc/History/2021-Question-Component.src.md: - `/init-once.php` is `include`d the FIRST time the component is loaded on a request... and can do anything
.docsrc/History/2021-Question-Component.src.md: - `Lia/Component.php` - The optional `Component` class can override the default `Component` class & use overridden methods to do certain things, as the Component loading process specifies
.docsrc/History/2021-Question-Component.src.md: - `@METHOD` specifies the method(s) to respond to. Such as `@POST@GET`.
.docsrc/History/2021-Question-Component.src.md: - If none is specified, Only GET requests are allowed
.docsrc/History/2021-Question-Component.src.md: - This MUST be at the beginning of the file name
.docsrc/History/2021-Question-Component.src.md: - The method list is terminated with a `.`
.docsrc/History/2021-Question-Component.src.md: - `$paramater` - `paramater` (in the file name) must match REGEX `[a-zA-Z0-9\_]+\#?`.
.docsrc/History/2021-Question-Component.src.md: - Any character NOT matching this terminates the dynamic portion of the url & is a literal character
.docsrc/History/2021-Question-Component.src.md: - `#` terminates the param name but IS NOT a literal character. You can subsequently add another `#` after the terminating `#` to have a literal `#`
.docsrc/History/2021-Question-Component.src.md: - Ex: file `$pet1##$pet2` responds to url `/cat#dog/`
.docsrc/History/2021-Question-Component.src.md: - `$¶mater` declares an optional paramater.
.docsrc/History/2021-Question-Component.src.md: - `.` declares a `/` in the url
.docsrc/History/2021-Question-Component.src.md: - `..` or `literal.$&optional.php` (where the optional param is not present) will be handled as a single `.`...
.docsrc/History/2021-Question-Component.src.md: - How do I do a literal `.` in the url? Or a literal `$`? or literal `&`
.docsrc/History/2021-Question-Component.src.md: - V1: No `.` in urls. No `$` in urls
.docsrc/History/2021-Question-Component.src.md: - V2:
.docsrc/History/2021-Question-Component.src.md: - Maybe `&.`?
.docsrc/History/2021-Question-Component.src.md: - and `&$` ?
.docsrc/History/2021-Question-Component.src.md: - and `&&` ?
.docsrc/History.src.md:---
.docsrc/History.src.md:2. Server setup: Database configuration, other non-liaison things
.docsrc/History.src.md:3. `$lia = new Liaison()` <- Liaison adds its built-in package (or pass `['bare'=>true]`)
.docsrc/History.src.md: 2. `$Component->onCreate()` <- Called from `\Lia\Compo`
.docsrc/History.src.md: 3. `$Component->onReady()` <- Called from `\Lia\Compo`
.docsrc/History.src.md: 4. `$Component->onComponentsLoaded()` <- After all components in THIS package have called `onCreate` & `onReady`. Called by `\Lia\Package`
.docsrc/History.src.md: 5. `$Component->onPackageReady()` <- After routes, views, & configs have been loaded for this package
.docsrc/History.src.md: - `$Component->onPrePackageReady()` is called first, but is not recommended. If used, you must call `parent::onPrePackageReady()` to keep prefix scanning enabled
.docsrc/History.src.md:5. `$lia->deliver()` calls `$lia->getResponse()` (the following is all called from `\Lia\Compo\Server`)
.docsrc/History.src.md: 1. `$lia->emit('PreAllPackagesReady')`
.docsrc/History.src.md: 2. emit `AllPackagesReady` <- Handle in components by declaring `onEmitAllPackagesReady()`
.docsrc/History.src.md: 8. `if ($response->useTheme)`, load theme, emit `ThemeLoaded($themeView)`, then set `$response->content` to `(string)$themeView`
.docsrc/History.src.md:6. `$lia->deliver()` has a response
.docsrc/History.src.md: 1. `$response->sendHeaders()`
.docsrc/History.src.md: 2. `if ($response->sendContent) echo $response->content`
.docsrc/README.src.md:`v0.6` will be the next version & will come with major internal changes but likely will not have any significant changes to the API. The current version has Package & Addon as sub-classes of Lia. Also, there are MANY properties by-reference. These complexities are slow & confusing. In the new version, Packages & Addons will likely not extend from Liaison any further. And by-reference properties will be removed.
.docsrc/README.src.md:`v0.5` marks the official beta. Software-wise, it's basically ready to go. Documentation wise, it's pretty poor. There are some weird things in here that will make it hard for you to use to it's full ability until I finish writing proper documentation. There's also some minor code issues in Liaison that I do need to fix.
.docsrc/README.src.md:1. Write a deliver script, such as `deliver.php`. Comment out the `require add-route.php` line
.docsrc/README.src.md:3. Start the server: `php -S localhost:3000 deliver.php`. Visit `http://localhost:3000/` in your browser
.docsrc/README.src.md:Ideally, write tests to ensure your site works as expected. See @see_file(test/run/ServerMinimal.php) for simple examples. I use @easy_link(tlf, php/tester), but [Php Unit](https://phpunit.de/) is the popular go-to for php testing
.docsrc/README.src.md:5. Write a route in your `deliver.php` file. Alternatively, make a public file `public/{slug}.php` and `echo $view` instead of `$response->content = $view`;
.docsrc/README.src.md:@file(test/ServerMinimal/add-route.php)
.docsrc/README.src.md:- `Lia` manages methods, addons, and properties
.docsrc/README.src.md:- `Lia\Package` is a base class for packaging addons together
.docsrc/README.src.md:- `Lia\Addon` is a base class for writing addons
.docsrc/README.src.md:- `Lia\Package\Server` helps deliver websites by tying together main addons (public files, views, cache, autoloading, and more)
.docsrc/README.src.md:- dir `code/class/Object/*` are objects used by built-in components
.docsrc/README.src.md:- dir `code/class/Utility/*` are Utility classes
.docsrc/README.src.md:- dir `view/theme` provides a default theme
.docsrc/README.src.md:- dir `file/mime_type_map.php` is just that
.docsrc/README.src.md:- Autoloader: loads classes within given directories
.docsrc/README.src.md:- Cache: cache key/value pairs & files
.docsrc/README.src.md:- Error: Report errors to users
.docsrc/README.src.md:- Hook: register & call hooks (very generic form of extensibility)
.docsrc/README.src.md:- Redirect: Redirect requests
.docsrc/README.src.md:- Resources:
.docsrc/README.src.md: - Add css & js files, urls, and/or code blocks to a request
.docsrc/README.src.md: - Sorting api to set order of resource files in compiled output
.docsrc/README.src.md: - Routes to compiled resource files
.docsrc/README.src.md: - Manages seo information (this should go in a new component)
.docsrc/README.src.md: - Outputs headHtml (must be called)
.docsrc/README.src.md: - Passes compiled files to cache component
.docsrc/README.src.md:- ResourceSorter: A wrapper around the `Resources` sorting api, to make it easier
.docsrc/README.src.md:- Router: Set pattern & static routes. Parse paramaters from urls. Process url for route target (package, callable, file)
.docsrc/README.src.md:- Server: Handles request delivery
.docsrc/README.src.md: - Helps all the addons work together to respond to a url
.docsrc/README.src.md: - delivers static non-php files
.docsrc/README.src.md:- View: Display re-usable scripts/templates
.docsrc/README.src.md: - config.json <- Package settings
.docsrc/README.src.md: - public/ <- Public files to be routed to. Ex: `public/contact.php` routes to `/contact/`
.docsrc/README.src.md: - view/ <- Views
.docsrc/README.src.md: - addon/ <- Addons (generally extending from \Lia\Addon)
.docsrc/README.src.md: - class/ <- Classes to autoload, PSR4 style. Will be converted to classmap style later
.docsrc/README.src.md: - cache/ <- Dir to store cache files. Only one cache dir is used (each app does not get its own)
.docsrc/README.src.md:- Environment-dependent features are not built-in, but I recommend my @easy_link(tlf, php/env)
docs/api/code/class/Objects/Request.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Objects/Request.php.md:- `protected $data;` $_GET or $_POST params or null, depending on the request method.
docs/api/code/class/Objects/Request.php.md:- `protected $url;` Url Path (no query string, no domain)
docs/api/code/class/Objects/Request.php.md:- `protected $method;` The method, GET, POST, PUT, etc
docs/api/code/class/Objects/Request.php.md:- `public function __construct($url=null, $methodnull)`
docs/api/code/class/Objects/Request.php.md:- `public function url()` Get the url
docs/api/code/class/Objects/Request.php.md:- `public function method()` Get the request method (GET, PUT, POST, etc)
docs/api/code/class/Objects/Request.php.md:- `public function data()` Get the request data (from `$_GET` or `$_POST` or null)
docs/api/code/class/Objects/Response.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Objects/Response.php.md:- `public $request;` Generally a \Lia\Obj\Request
docs/api/code/class/Objects/Response.php.md:- `public $content = '';` The body to send
docs/api/code/class/Objects/Response.php.md:- `public $useTheme;` Whether to apply a theme or not
docs/api/code/class/Objects/Response.php.md:- `public $headers = [];` headers to send
docs/api/code/class/Objects/Response.php.md:- `public $sendContent = true;` Whether to send content or not. Mark false if you're sending headers to load-from-cache
docs/api/code/class/Objects/Response.php.md:- `public function __construct($request)`
docs/api/code/class/Objects/Response.php.md:- `public function addHeader($header)`
docs/api/code/class/Objects/Response.php.md:- `public function addHeaders($headers)`
docs/api/code/class/Objects/Response.php.md:- `public function sendHeaders()`
docs/api/code/class/Objects/Route.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Objects/Route.php.md:- `protected $paramaters = [];` Paramaters extracted from the url, based upon the route.
docs/api/code/class/Objects/Route.php.md:Ex: `/blog/{slug}/` requested by `/blog/happy-cats/` would yield `['slug'=>'happy-cats']`
docs/api/code/class/Objects/Route.php.md:- `protected $url;` The requeted URL without any GET params
docs/api/code/class/Objects/Route.php.md:- `protected $method;` The request method, like GET, POST, etc
docs/api/code/class/Objects/Route.php.md:- `protected $urlRegex;` The regex that captured the url
docs/api/code/class/Objects/Route.php.md:- `protected $paramaterizedPattern;` The declared route, unparsed, like `/blog/{slug}/`
docs/api/code/class/Objects/Route.php.md:- `protected $placeholderPattern;` A simplified pattern for the route-selection algorithm
docs/api/code/class/Objects/Route.php.md:- `protected $allowedMethods = [];` Array of methods that are valid for this route. Such as GET, PUT, POST, DELETE, etc
docs/api/code/class/Objects/Route.php.md:- `protected $target;` The thing being routed to. A callable or an absolute file path
docs/api/code/class/Objects/Route.php.md:- `protected $package;` The package that create the route which was matched.
docs/api/code/class/Objects/Route.php.md:- `public function __construct($details)` Make a route
docs/api/code/class/Objects/Route.php.md:- `public function part($index)` The piece of the url to return
docs/api/code/class/Objects/Route.php.md:- `public function param($key)` Get a named url paramater.
docs/api/code/class/Objects/Route.php.md:- `public function var($index)` Get a named url paramater by index (zero-based)
docs/api/code/class/Objects/Route.php.md:- `public function package()`
docs/api/code/class/Objects/Route.php.md:- `public function url()` return the requested url
docs/api/code/class/Objects/Route.php.md:- `public function method()` return the requested method (GET/POST/etc)
docs/api/code/class/Objects/Route.php.md:- `public function target()` Get the callable or file this route points to
docs/api/code/class/Objects/Route.php.md:- `public function type()` get the type (is callable vs. is file)
docs/api/code/class/Objects/Route.php.md:- `public function isCallable()` check if target is callable
docs/api/code/class/Objects/Route.php.md:- `public function isFile()` check if target is a file
docs/api/code/class/Objects/Route.php.md:- `public function fileExt()` get the file extension if target is a file
docs/api/code/class/Objects/Route.php.md:- `public function paramaterizedPattern()` Get the target pattern for this route with {param} declarations
docs/api/code/class/Objects/Route.php.md:- `public function placeholderPattern()` Get the target pattern for this route with placeholders (?)
docs/api/code/class/Objects/Route.php.md:- `public function allowedMethods()` array of methods allowed for this route
docs/api/code/class/Objects/Route.php.md:- `public function paramaterCount()` number of url paramaters
docs/api/code/class/Objects/Route.php.md:- `public function paramaterNames()` names of url paramaters
docs/api/code/class/Objects/Route.php.md:- `public function paramaters()` array of paramaters
docs/api/code/class/Objects/Route.php.md:- `public function isStatic()` true if there are no paramaters in the route pattern
docs/api/code/class/Objects/Route.php.md:- `public function isDynamic()` true if there are paramaters in the route pattern
docs/api/code/class/Objects/View.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Objects/View.php.md:A View, which passes properties to a template file and loads associated resources (.css/.js files). You must invoke `__toString()` (`''.$view`) or `$view->content()` or `$view->resources()` or nothing happens.
docs/api/code/class/Objects/View.php.md:- `protected $name;` Relative path to the view without file extension. Ex: `view/theme/Header.php` is named `theme/Header`
docs/api/code/class/Objects/View.php.md:- `protected $dir;` The root directory for finding views
docs/api/code/class/Objects/View.php.md:- `public $args = [];` Arguments to pass to the template file
docs/api/code/class/Objects/View.php.md:- `protected $content = null;` Output from including the template file
docs/api/code/class/Objects/View.php.md:- `protected $resources = null;` Array of resources
docs/api/code/class/Objects/View.php.md:- `public function __construct($name, $dir, $allArgs)`
docs/api/code/class/Objects/View.php.md:- `public function resources()` Load all css & js files in the view's directory
docs/api/code/class/Objects/View.php.md:- `public function content()` Load template file
docs/api/code/class/Objects/View.php.md:- `public function __toString()` shorthand for content()
docs/api/code/class/Objects/ViewCallable.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Objects/ViewCallable.php.md:- `protected $viewData;`
docs/api/code/class/Objects/ViewCallable.php.md:- `public function __construct($viewData)`
docs/api/code/class/Objects/ViewCallable.php.md:- `public function __toString()`
docs/api/code/class/Utility/ClassFinder.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Utility/ClassFinder.php.md:- `static public function classesFromDir($classDir)`
docs/api/code/class/Utility/ClassFinder.php.md:- `static public function getClassFromFile($file)`
docs/api/code/class/Utility/Files.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Utility/Files.php.md:- `static public function all($dir,$fPathsRelTo='', $endingWith'')` Get all files in a directory. Does not return directories
docs/api/code/class/Utility/StaticFile.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Utility/StaticFile.php.md:- `protected $file;` The absolute file path
docs/api/code/class/Utility/StaticFile.php.md:- `protected string $type;` the intended file extension, in case $file has a weird naming convention
docs/api/code/class/Utility/StaticFile.php.md:- `protected $headers = [];` Array of headers
docs/api/code/class/Utility/StaticFile.php.md:- `protected $typeHeaders = [];` headers for the content type & content length
docs/api/code/class/Utility/StaticFile.php.md:- `protected $cacheHeaders = [];` headers for the cache-state
docs/api/code/class/Utility/StaticFile.php.md:- `public $userHasFileCached = false;` true if request headers indicate the file has been cached on the client
docs/api/code/class/Utility/StaticFile.php.md:- `public function __construct($file, $type=null)`
docs/api/code/class/Utility/StaticFile.php.md:- `public function getContentTypeHeaders()`
docs/api/code/class/Utility/StaticFile.php.md:- `public function getCacheHeaders()`
docs/api/code/class/Utility/StaticFile.php.md:- `public function getHeaders()`
docs/api/code/class/Utility/StaticFile.php.md:- `protected function getFileMimeType($filePath)` Get mime type of a file based on its extension
docs/api/code/class/ExceptionCatcher.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/ExceptionCatcher.php.md:- `protected $trace;`
docs/api/code/class/ExceptionCatcher.php.md:- `protected $message;`
docs/api/code/class/ExceptionCatcher.php.md:- `protected $dir;`
docs/api/code/class/ExceptionCatcher.php.md:- `protected $subs = [];`
docs/api/code/class/ExceptionCatcher.php.md:- `public $liaMessage;`
docs/api/code/class/ExceptionCatcher.php.md:- `static public function message($e)` prints the informative message (use output buffering if you want)
docs/api/code/class/ExceptionCatcher.php.md:- `static public function trace($e)` prints the stack trace
docs/api/code/class/ExceptionCatcher.php.md:- `static public function throw($e, $print_messages=true)` throw the given error after printing a custom trace and message
docs/api/code/class/ExceptionCatcher.php.md:- `static public function report($trace_entry)`
docs/api/code/class/ExceptionCatcher.php.md:- `static public function dir()`
docs/api/code/class/ExceptionCatcher.php.md:- `static public function getExternalTrace($exception)`
docs/api/code/class/Package.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Package.php.md:- `public $name = 'package';`
docs/api/code/class/Package.php.md:- `public $dir;` The root dir for the package (app?)
docs/api/code/class/Package.php.md:- `public function __construct($liaison=null, $namenull, $dirnull)`
docs/api/code/class/Package.php.md:- `public function load_addons($sub_dir)`
docs/api/code/class/Package.php.md:- `public function ready()`
docs/api/code/class/Package.php.md:- `public function dir($sub_dir)`
docs/api/code/class/OldPackage.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/OldPackage.php.md:- `public $name;` The configured name of this package or uniqid() if not specified
docs/api/code/class/OldPackage.php.md:- `public $dir;` The root dir for the package
docs/api/code/class/OldPackage.php.md:- `public $lia;` the liaison instance
docs/api/code/class/OldPackage.php.md:- `protected $compos = [];` All compos added. `['name'=>$compoObject, 'name2'=>$otherCompo]`
docs/api/code/class/OldPackage.php.md:- `protected $lifecycleCompos = [];` Components implementing `LiaisonInterface\PackageLifeCycle`
docs/api/code/class/OldPackage.php.md:- `protected $config = [
docs/api/code/class/OldPackage.php.md:- `public function __construct( $lia, string $dir=null, array $configs [])` Initialize package.
docs/api/code/class/OldPackage.php.md:- Configs are loaded from a config file in the package. Any keys set in the $config array will replace values set in the config file
docs/api/code/class/OldPackage.php.md:- Setup is only performed if dir is non-null
docs/api/code/class/OldPackage.php.md:- `public function setup(array $configs, string $dir = null)` Setup the package.
docs/api/code/class/OldPackage.php.md:- `public function onComponentsLoaded()` @override
docs/api/code/class/OldPackage.php.md:- `public function onPrePackageReady()` @override
docs/api/code/class/OldPackage.php.md:- `public function onPackageReady()` @override
docs/api/code/class/OldPackage.php.md:- `protected function lifecycle($name)` Execute the given lifecycle method on each component in this package
docs/api/code/class/OldPackage.php.md:Execute same-named php file in the package's `package_lifecycle` dir
docs/api/code/class/OldPackage.php.md:- `public function addComponent($name, $component)` Add a component to the package.
docs/api/code/class/OldPackage.php.md:- `protected function setup_config_file(string $configFile)` Load Config file. Currently `$package->dir.'/config.json'`.
docs/api/code/class/OldPackage.php.md:- `public function fileToPattern($relFile)` Convert a relative file path into a pattern for the Router component
docs/api/code/class/OldPackage.php.md:- `public function set($key, $value)` Set a config on the package (Does NOT propagate to Liaison)
docs/api/code/class/OldPackage.php.md:- `public function get($key)` Get a config from the package (NOT from Liaison)
docs/api/code/class/OldPackage.php.md:- `public function class($forKey)` Get the configured class for the given key.
docs/api/code/class/OldPackage.php.md:- `public function compo($name)` Get the named component from the package
docs/api/code/class/OldPackage.php.md:- `public function dir($forKey=null)` Get the path to a directory in this package, or the package root dir if `$forKey==null`
docs/api/code/class/OldPackage.php.md:- `public function url($path, $getParams=null)` Prepends base url to the given path & sets $getparams as querystring. Replaces all double shashes (`//`) with single (`/`)
docs/api/code/class/OldPackage.php.md:- `public function setup_autoload($dir)` Adds configured 'autoload' dir to the Autoloader component
docs/api/code/class/OldPackage.php.md:- `protected function setup_components(string $dir)` Load all components from the configured 'component' dir
docs/api/code/class/OldPackage.php.md:- `public function setup_public_routes($dir, $prefix=null)` Add all files in configured 'public' dir to the Router component
docs/api/code/class/OldPackage.php.md:- `public function setup_views(string $dir, array $args)` Add all views in configured 'view' dir to the View Component
docs/api/code/class/Addon.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Addon.php.md:- `public $fqn;` Fully qualified name for accessing this addon
docs/api/code/class/Addon.php.md:- `public $name;` The short name of this addon
docs/api/code/class/Addon.php.md:- `public function __construct($liaison=null, $namenull)`
docs/api/code/class/Lia.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Lia.php.md:- `public $addons = [];`
docs/api/code/class/Lia.php.md:- `public $methods = [];`
docs/api/code/class/Lia.php.md:- `public $props = [];`
docs/api/code/class/Lia.php.md:- `public $fqn_addons = [];`
docs/api/code/class/Lia.php.md:- `public $prefixes = [];` Array where `key` is the prefix and `value` is a callable that is executed when a prefixed-method is found
docs/api/code/class/Lia.php.md:- `public $_lia;` Root liaison object
docs/api/code/class/Lia.php.md:- `public $lia;` Parent liaison object
docs/api/code/class/Lia.php.md:- `public function __construct($liaison=null)`
docs/api/code/class/Lia.php.md:- `protected function copy($lia)`
docs/api/code/class/Lia.php.md:- `public function scan($prefix, $object=null)`
docs/api/code/class/Lia.php.md:- `public function set($key, $value)`
docs/api/code/class/Lia.php.md:- `public function append($key,$value)`
docs/api/code/class/Lia.php.md:- `public function get($key)`
docs/api/code/class/Lia.php.md:- `public function default($key, $value)`
docs/api/code/class/Lia.php.md:- `public function addAddon($addon, $name)`
docs/api/code/class/Lia.php.md:- `public function addMethod($name, $callable)`
docs/api/code/class/Lia.php.md:- `public function addPrefix($prefix, $method)`
docs/api/code/class/Lia.php.md:- `public function addon($fqn)` Get an addon by it's fully-qualified-name
docs/api/code/class/Lia.php.md:- `public function __call($method, $args)`
docs/api/code/class/Lia.php.md:- `public function __get($addon)` get the named addon
docs/api/code/class/Lia.php.md:- `public function __set($name, $addon)` get the named addon
docs/api/code/class/Lia.php.md:- `public function dump()` Dump a bunch of info about liaison. Methods. Addons. Properties.
docs/api/code/class/Lia.php.md:- `public function __map_array__($value)`
docs/api/code/class/Router/FastFileRouter.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Router/FastFileRouter.php.md:- `static public function php($dir,$args=[])` Very quickly deliver a php file by appending the url to a directory
docs/api/code/class/Router/FastFileRouter.php.md:- `static public function file($dir, $url=null)` Very quickly deliver a file. Supports browser caching.
docs/api/code/class/Router/FastFileRouter.php.md:- `static public function send_file($file_path)` send headers & output file
docs/api/code/class/Router/FastFileRouter.php.md:- `static public function get_mime_type($file_path)`
docs/api/code/class/Server.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/class/Server.php.md:- `public $fqn = 'lia:server';`
docs/api/code/class/Server.php.md:- `public $name = 'server';`
docs/api/code/class/Server.php.md:- `public $base_url = '';` Setting this directly does not work, bc routes are setup during the constructor.
docs/api/code/class/Server.php.md:Instead do `$lia->set('package_name.base_url', '/base_url/');`
docs/api/code/class/Server.php.md:- `public function __construct($lia, $name=null, $dirnull)`
docs/api/code/class/Server.php.md:- `public function setup_public_routes($dir, $prefix)`
docs/api/code/class/Server.php.md:- `static public function main($lia)`
docs/api/code/class/Server.php.md:- `static public function main_dir()`
docs/api/code/addon/Autoload.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/addon/Autoload.php.md:- `public $fqn = 'lia:server.autoload';`
docs/api/code/addon/Autoload.php.md:- `public $dirs;` an key=>value array
docs/api/code/addon/Autoload.php.md:- `public function __construct($lia=null, $namenull)`
docs/api/code/addon/Autoload.php.md:- `public function enable()`
docs/api/code/addon/Autoload.php.md:- `public function addDir($dir,...$baseNamespaces)` add a directory to be autoloaded, psr4-ish
docs/api/code/addon/Autoload.php.md:- ``
docs/api/code/addon/Server.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/addon/Server.php.md:- `public $fqn = 'lia:server.server';`
docs/api/code/addon/Server.php.md:- `public $bufferResponse = true;` true to flush the output buffer after sending headers & echoing response
docs/api/code/addon/Server.php.md:- `public $useTheme = true;` true to enable theme
docs/api/code/addon/Server.php.md:- `public function __construct($lia=null, $namenull)`
docs/api/code/addon/Server.php.md:- `public function protocol()`
docs/api/code/addon/Server.php.md:- `public function urlWithDomain($relativeUrl)`
docs/api/code/addon/Server.php.md:- `public function getResponse($url=null, $methodnull)`
docs/api/code/addon/Server.php.md:- `public function apply_theme($route, $response)` Applies the theme (if response->useTheme & server->useTheme are true)
docs/api/code/addon/Server.php.md:- `public function process_route($route, $response)` Process a route & setup the response's content & headers
docs/api/code/addon/Server.php.md:- `public function try_redirect_to_corrected_url($url, $method)` This is a sloppy bad function that needs rewritten
docs/api/code/addon/Server.php.md:- `public function send_response($response)`
docs/api/code/addon/Server.php.md:- `public function deliver($url=null, $methodnull)`
docs/api/code/addon/Server.php.md:- `protected function closeConnection()` Close the connection with client. May not work on all hosts, due to apache/server configuration, I'm pretty sure.
docs/api/code/addon/Server.php.md:- `public function requirePhpFileRoute($route,$response)`
docs/api/code/addon/Server.php.md:- `public function getDistinctRoute($routeList)`
docs/api/code/addon/View.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/addon/View.php.md:- `public $fqn = 'lia:server.view';`
docs/api/code/addon/View.php.md:- `public $name = 'view';`
docs/api/code/addon/View.php.md:- `public $views = [null=>[]];` Views to be loaded.
docs/api/code/addon/View.php.md:- `public array $globalArgs = [];` Args to pass to every view
docs/api/code/addon/View.php.md:- `public function __construct($lia=null, $namenull)`
docs/api/code/addon/View.php.md:- `public function addDir($dir, $package)`
docs/api/code/addon/View.php.md:- `public function addView($view_name, $dir)`
docs/api/code/addon/View.php.md:- `public function addViewFile($view_name, $file)`
docs/api/code/addon/View.php.md:- `public function addViewCallable($view_name, $callable)`
docs/api/code/addon/View.php.md:- `public function view($name, $args=[])`
docs/api/code/addon/View.php.md:- `public function show_file($view, $args)`
docs/api/code/addon/View.php.md:- `public function show_callable($view, $args)`
docs/api/code/addon/View.php.md:- `public function show_main($view, $args)`
docs/api/code/addon/View.php.md:- `public function addFiles($dir)` add resource files in the given directory
docs/api/code/addon/Error.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/addon/Error.php.md:- `public $fqn = 'lia:server.error';`
docs/api/code/addon/Error.php.md:- `public $headerError = false;`
docs/api/code/addon/Error.php.md:- `protected int $statusCode = null;`
docs/api/code/addon/Error.php.md:- `public string $pageMessage = null;`
docs/api/code/addon/Error.php.md:- `public string $headerMessage = null;`
docs/api/code/addon/Error.php.md:- `public string $gotoMessage = null;`
docs/api/code/addon/Error.php.md:- `protected bool $isPageError = false;`
docs/api/code/addon/Error.php.md:- `public function __construct($lia=null, $namenull)`
docs/api/code/addon/Error.php.md:- `public function error_goto(string $message, int $statusCode=500)`
docs/api/code/addon/Error.php.md:- `public function error_log(string $message, int $level)`
docs/api/code/addon/Error.php.md:- `public function error_header(string $message, int $statusCode=null)`
docs/api/code/addon/Error.php.md:- `public function error_page(string $message, int $statusCode=500)`
docs/api/code/addon/Error.php.md:- `public function onResponseReady($response)`
docs/api/code/addon/Error.php.md:- `public function statusCodeText(int $statusCode)`
docs/api/code/addon/Hook.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/addon/Hook.php.md:- `public $fqn = 'lia:server.hook';`
docs/api/code/addon/Hook.php.md:- `public $hooks = [];` array of hooks like `['hook.name'=>[ [$object, 'method'], function(){echo "one";} ] ];`
docs/api/code/addon/Hook.php.md:- `public function __construct($lia=null, $namenull)`
docs/api/code/addon/Hook.php.md:- `public function prefix_method_added($obj, $method, $hook_name)` Add an object's method as a hook.
docs/api/code/addon/Hook.php.md:- `public function add($name, $callable)`
docs/api/code/addon/Hook.php.md:- `public function call($name, ...$args)`
docs/api/code/addon/ResourceSorter.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/addon/ResourceSorter.php.md:- `public $fqn = 'lia:server.resourcesorter';`
docs/api/code/addon/ResourceSorter.php.md:- `protected $didSet=false;`
docs/api/code/addon/ResourceSorter.php.md:- `protected $orders=['css'=>[], 'js'=>[]];`
docs/api/code/addon/ResourceSorter.php.md:- `public function __construct($lia=null, $namenull)`
docs/api/code/addon/ResourceSorter.php.md:- `public function setResourceOrder($ext,$names, $prepend=true)` Give an array of file names in the order they should be sent to the browser
docs/api/code/addon/ResourceSorter.php.md:- `public function getSortedFiles($unsortedFiles)`
docs/api/code/addon/Seo.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/addon/Seo.php.md:https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started
docs/api/code/addon/Seo.php.md:- `public $fqn = 'lia:server.seo';`
docs/api/code/addon/Seo.php.md:- `public $seo = [];` array of seo values like:
docs/api/code/addon/Seo.php.md:- `public $html = [];` array of html like `['title'=>['<title>The Title</title>', '<meta ...'], 'image'=>['<meta property="og:image:alt" ...>']]`
docs/api/code/addon/Seo.php.md:- `public function __construct($lia=null, $namenull)`
docs/api/code/addon/Seo.php.md:- `public function seo($params)` Shorthand to set seo paramaters from an array.
docs/api/code/addon/Seo.php.md:- `public function title($title)`
docs/api/code/addon/Seo.php.md:- `public function description($description)`
docs/api/code/addon/Seo.php.md:- `public function image($url, $altText)`
docs/api/code/addon/Seo.php.md:- `public function url($url)`
docs/api/code/addon/Seo.php.md:- `public function site_name($siteName)`
docs/api/code/addon/Seo.php.md:- `public function keywords($keywords)`
docs/api/code/addon/Seo.php.md:- `public function get_html()`
docs/api/code/addon/Redirect.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/addon/Redirect.php.md:- `public $fqn = 'lia:server.redirect';`
docs/api/code/addon/Redirect.php.md:- `public $redirectUrl;`
docs/api/code/addon/Redirect.php.md:- `public $withMessage = false;`
docs/api/code/addon/Redirect.php.md:- `public $statusCode = 302;`
docs/api/code/addon/Redirect.php.md:- `public $message = null;`
docs/api/code/addon/Redirect.php.md:- `public $name = 'goto';`
docs/api/code/addon/Redirect.php.md:- `public function __construct($lia=null, $namenull)`
docs/api/code/addon/Redirect.php.md:- `public function goto($url, $statusCode=302)`
docs/api/code/addon/Redirect.php.md:- `public function gotoSetMessage($message)`
docs/api/code/addon/Redirect.php.md:- `public function gotoWithMessage($url, $message, $statusCode=302)`
docs/api/code/addon/Redirect.php.md:- `public function getGotoMessage()` Get the redirect message associated with `$_GET['message_id']`
docs/api/code/addon/Redirect.php.md:- `public function get_url()` get the url with `message_id` set in query params.
docs/api/code/addon/Redirect.php.md:- `public function go()`
docs/api/code/addon/Cache.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/addon/Cache.php.md:- `public $fqn = 'lia:server.cache';`
docs/api/code/addon/Cache.php.md:- `public $dir;` The dir to write cache files to
docs/api/code/addon/Cache.php.md:- `public bool $enabled = true;`
docs/api/code/addon/Cache.php.md:- `public int $stale_check_frequency = 60*24;` Number of minutes between stale cache checks
docs/api/code/addon/Cache.php.md:- `public $main = 'main.php';` The main file to write to & read from
docs/api/code/addon/Cache.php.md:- `public $configs;` Key=>values that get written to disk in a single file (call $cache->write())
docs/api/code/addon/Cache.php.md:- `public function __construct($lia=null, $namenull)`
docs/api/code/addon/Cache.php.md:- `public function main_file_path()`
docs/api/code/addon/Cache.php.md:- `public function read()` reads main key=>value pairs from disk into memory
docs/api/code/addon/Cache.php.md:- `public function write()` Write main key=>value pairs to disk from memory
docs/api/code/addon/Cache.php.md:- `public function is_cache_file_valid($key)` Check if: cache is enabled, cached file exists, cached file is NOT expired
docs/api/code/addon/Cache.php.md:- `public function get_cache_file_content($key)` Get content of a cached file, if cache is valid
docs/api/code/addon/Cache.php.md:- `public function get_cache_file_path($key)` Get path to cached file if cache is valid
docs/api/code/addon/Cache.php.md:- `public function cache_file_path($key)` Get the path for a cached file
docs/api/code/addon/Cache.php.md:- `public function cache_meta_file_path($key)` get the path to a meta file, which contains expiration time of cached files
docs/api/code/addon/Cache.php.md:- `public function cache_file($key, $value, $maxAge=60*60*24*5)` Store $value to file by identified by $key
docs/api/code/addon/Cache.php.md:- `public function delete_stale_files()` Delete stale cache files IF a stale cache check is required
docs/api/code/addon/Cache.php.md:- `public function run_delete_stale_files()` Delete stale cache files (unconditional)
docs/api/code/addon/Cache.php.md:- `public function is_stale_cache_check_required()` check if stale cache check is required
docs/api/code/addon/Cache.php.md:- `protected function deleteStaleCacheFiles()`
docs/api/code/addon/Cache.php.md:- `public function create_dir($dir)` Creates directory if it does not exist.
docs/api/code/addon/Resources.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/addon/Resources.php.md:- `public $fqn = 'lia:server.resources';`
docs/api/code/addon/Resources.php.md:- `public $files = [];`
docs/api/code/addon/Resources.php.md:- `public $urls = [];`
docs/api/code/addon/Resources.php.md:- `public $sorter = [];`
docs/api/code/addon/Resources.php.md:- `public $minify = true;` to minify css & js or not
docs/api/code/addon/Resources.php.md:- `public $useCache = true;` Whether to enable cache or not.
docs/api/code/addon/Resources.php.md:- `public function __construct($lia=null, $namenull)`
docs/api/code/addon/Resources.php.md:- `public function onPackageReady($package)`
docs/api/code/addon/Resources.php.md:- `protected function cleanExt($ext)`
docs/api/code/addon/Resources.php.md:- `protected function cacheMapName($ext)`
docs/api/code/addon/Resources.php.md:- `public function setSorter($ext, $sorter)`
docs/api/code/addon/Resources.php.md:- `public function addFile($file)`
docs/api/code/addon/Resources.php.md:- `public function addUrl($url)`
docs/api/code/addon/Resources.php.md:- `public function getHtml()`
docs/api/code/addon/Resources.php.md:- `public function routePatternToRes($route,$response=null)` Returns routes for compiled resource files & later processes said routes
docs/api/code/addon/Resources.php.md:- `public function getFileTag($ext)`
docs/api/code/addon/Resources.php.md:- `public function getUrlTag($ext)`
docs/api/code/addon/Resources.php.md:- `public function getSortedFiles($ext)`
docs/api/code/addon/Resources.php.md:- `public function concatenateFiles($ext)`
docs/api/code/addon/Resources.php.md:- `public function concatenateFileNames($ext)`
docs/api/code/addon/Resources.php.md:- `public function compileFilesToCache($ext)`
docs/api/code/addon/Resources.php.md:- `public function getCompiledFilesUrl($ext)`
docs/api/code/addon/Resources.php.md:- `public function minifyFiles(string $fileContent, string $ext)`
docs/api/code/addon/Router.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/code/addon/Router.php.md:- `$dlm = $thisvarDelim;`
docs/api/code/addon/Router.php.md:- `$params = [];`
docs/api/code/addon/Router.php.md:- `$optionalParams = [];`
docs/api/code/addon/Router.php.md:- `$optionalParams[] $matches[2];`
docs/api/code/addon/Router.php.md:- `public function __construct($lia=null, $namenull)` Callables that can route a request & return false if they don't route
docs/api/code/addon/Router.php.md:- `public function dir_to_patterns($dir, $prefix='')` Get an array of patterns from files in a directory.
docs/api/code/addon/Router.php.md:- `public function fileToPattern($relFile)` Convert a relative file path into a pattern
docs/api/code/addon/Router.php.md:- `public function clean_url($dirty_url)` Clean a url (without domain): replace space with '+', single quote with '%27', and replace multiple slashes with a single slash
docs/api/code/addon/Router.php.md:- `public function handle_route_prefix_method($object, $m, $dot_name)` Get routes by calling the object's method & use the method as the router.
docs/api/code/addon/Router.php.md:- `public function addRoute($pattern, $callbackOrFile,$package=null)` Add a route
docs/api/code/addon/Router.php.md:- `public function separate_optional_from_decoded_pattern($original_parsed)` Facilitates optional paramaters
docs/api/code/addon/Router.php.md:- `public function addRouter(callable $router)` add a callable as a router. It will be called with a `\Lia\Obj\Request` object as the only paramater
docs/api/code/addon/Router.php.md:- `public function route(\Lia\Obj\Request $request)` get a route for the given request
docs/api/test/input/Al_Classes/some_ns/for_you/a7f8d5885bd2a6108b572be65fab164.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/input/Al_Classes/a0ffef99414f809d51b31add84679d2.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/input/Al_Classes/acee78cf7b2b4262cc04e25b75ba115.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/input/Al_Classes/a2f576ef44995f79819d483ec55c9cc.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/input/AppPackage/addon/Autoloader.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/input/AppPackage/addon/Cache.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/input/AppPackage/addon/Hook.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/input/AppPackage/class/Somethin.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/input/Hook/Sample.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/input/Hook/Sample.php.md:- `public function onHook_Test()`
docs/api/test/run/ToSort/Addon/Autoload.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/Autoload.php.md:- `public function testAutoloadNsClassWithPrefix()`
docs/api/test/run/ToSort/Addon/Redirect.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/Redirect.php.md:- `public function testGoto()`
docs/api/test/run/ToSort/Addon/Redirect.php.md:- `protected function cache_dir()`
docs/api/test/run/ToSort/Addon/Seo.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/Seo.php.md:- `public function testSeoFromArray()`
docs/api/test/run/ToSort/Addon/Seo.php.md:- `public function testSeoLiaMethods()`
docs/api/test/run/ToSort/Addon/Router.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/Router.php.md:- `public function testPatternAndParamatersToUrl()`
docs/api/test/run/ToSort/Addon/Router.php.md:- `public function testExtractUrlParamaters()`
docs/api/test/run/ToSort/Addon/Router.php.md:- `public function testDecodePatternWithOptionalParamaters()`
docs/api/test/run/ToSort/Addon/Router.php.md:- `public function testUrlToRegex()` Example of `$router->url_to_regex()`
docs/api/test/run/ToSort/Addon/Router.php.md:- `public function testDecodePattern()` Example of `$router->decode_pattern()`
docs/api/test/run/ToSort/Addon/Router.php.md:- `public function testDecodedPatternToUrl()` Example of `$router->decoded_pattern_to_url()`. @see(testParsePatternExample) to see what the `$decoded` array looks like
docs/api/test/run/ToSort/Addon/Resources.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/Resources.php.md:- `public function testAddUrl()`
docs/api/test/run/ToSort/Addon/Resources.php.md:- `public function testCompiledHtml()`
docs/api/test/run/ToSort/Addon/Resources.php.md:- `public function testDuplicateCompile()`
docs/api/test/run/ToSort/Addon/Resources.php.md:- `public function testDeliverCss()`
docs/api/test/run/ToSort/Addon/Resources.php.md:- `public function testDeliverJs()`
docs/api/test/run/ToSort/Addon/Resources.php.md:- `public function testCacheCompiledJSFile()`
docs/api/test/run/ToSort/Addon/Resources.php.md:- `public function testCacheCompiledCSSFile()`
docs/api/test/run/ToSort/Addon/Resources.php.md:- `public function testSortCss()`
docs/api/test/run/ToSort/Addon/Resources.php.md:- `public function testCompileCss()`
docs/api/test/run/ToSort/Addon/Resources.php.md:- `public function testSortJs()`
docs/api/test/run/ToSort/Addon/Resources.php.md:- `public function testCompileJs()`
docs/api/test/run/ToSort/Addon/Resources.php.md:- `protected function dir()`
docs/api/test/run/ToSort/Addon/ResourceSorter.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/ResourceSorter.php.md:- `public function testSortCss()`
docs/api/test/run/ToSort/Addon/ResourceSorter.php.md:- `public function dir()`
docs/api/test/run/ToSort/Addon/Error.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/Error.php.md:- `$lia = new \Lia();`
docs/api/test/run/ToSort/Addon/Error.php.md:- `$router = new \Lia\Addon\Router($lia);`
docs/api/test/run/ToSort/Addon/Error.php.md:- `$error = new \Lia\Addon\Error($lia);`
docs/api/test/run/ToSort/Addon/Error.php.md:- `$codes = [
docs/api/test/run/ToSort/Addon/Error.php.md:- `foreach ($codes as $num=>$text)
docs/api/test/run/ToSort/Addon/Error.php.md:- `$thiscompare($text,$errorstatusCodeText($num));`
docs/api/test/run/ToSort/Addon/Error.php.md:- `public function view_dir()`
docs/api/test/run/ToSort/Addon/Error.php.md:- `public function testErrorGoto()`
docs/api/test/run/ToSort/Addon/Cache.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/Cache.php.md:- `public function testDeleteStaleFiles()`
docs/api/test/run/ToSort/Addon/Cache.php.md:- `public function testFileCache()`
docs/api/test/run/ToSort/Addon/Cache.php.md:- `public function testMainCacheViaLiaMethod()` Tests $lia->cache() method & $lia->cache_get() method
docs/api/test/run/ToSort/Addon/Cache.php.md:- `public function testMainCacheViaLiaSet()`
docs/api/test/run/ToSort/Addon/Cache.php.md:- `public function testMainCache()` Uses $cache->set('a.key') & $cache->get('a.key');
docs/api/test/run/ToSort/Addon/Cache.php.md:- `protected function cache_dir()`
docs/api/test/run/ToSort/Addon/Hook.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/Hook.php.md:- `public function testHooks()` Test hook features
docs/api/test/run/ToSort/Addon/Hook.php.md:- `protected function cache_dir()`
docs/api/test/run/ToSort/Addon/Router.Other.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/Router.Other.php.md:- `public function testOptionalParamater()`
docs/api/test/run/ToSort/Addon/Router.Other.php.md:- `public function testPatternRouteMethod()`
docs/api/test/run/ToSort/Addon/Router.Other.php.md:- `public function testGetRoute()`
docs/api/test/run/ToSort/Addon/Router.Other.php.md:- `public function testUrlToTestReg()`
docs/api/test/run/ToSort/Addon/Router.Other.php.md:- `public function testParsePatterns()`
docs/api/test/run/ToSort/Addon/Server.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/Server.php.md:- `public function testResponseContentNoTheme()`
docs/api/test/run/ToSort/Addon/Server.php.md:- `public function testResponseContentWithTheme()`
docs/api/test/run/ToSort/Addon/Server.php.md:- `public function theme_view($name, $args)`
docs/api/test/run/ToSort/Addon/Server.php.md:- `public function sample_content($route, $response)`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `$liaaddViewCallable('theme',$liaTheme);`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `);`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `$phraseAny = 'view with no namespace';`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `);`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `$anyNamespace = $liaview('theme').'';`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `$thiscompare($phraseAny, $anyNamespace);`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `$specificNamespace = $liaview('lia:theme').'';`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `$thiscompare($phrase, $specificNamespace);`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `$thiscompare('view with wrong namespace', $liaview('wrong:theme').'');`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `public function testViewNotFound()`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `public function testNullNamespaceNotFound()`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `public function testNamespaceNotFound()`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `public function testNoNamespaceFallback()`
docs/api/test/run/ToSort/Addon/ViewOld.php.md:- `public function testAddViewCallableWithNamespace()`
docs/api/test/run/ToSort/Addon/View.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Addon/View.php.md:- `public function testNestedViewResources()`
docs/api/test/run/ToSort/Addon/View.php.md:- `public function testSiblingViewResources()`
docs/api/test/run/ToSort/Addon/View.php.md:- `public function testAddViewMain()`
docs/api/test/run/ToSort/Addon/View.php.md:- `public function testAddViewCallable()`
docs/api/test/run/ToSort/Addon/View.php.md:- `public function testAddViewFile()`
docs/api/test/run/ToSort/Addon/View.php.md:- `public function view_dir()`
docs/api/test/run/ToSort/Addon/View.php.md:- `public function view_dir_2()`
docs/api/test/run/ToSort/BasePackage.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/BasePackage.php.md:- `public function testPackageAddonIntegration()` Test the Package's integration with addons.
docs/api/test/run/ToSort/BasePackage.php.md:- `public function package_dir()`
docs/api/test/run/ToSort/ExceptionCatcher.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/ExceptionCatcher.php.md:- `public function testCatchMethodNotFound()`
docs/api/test/run/ToSort/Liaison.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Liaison.php.md:- `public function testRootCallMethods()`
docs/api/test/run/ToSort/Liaison.php.md:- `public function testAddDotMethods()`
docs/api/test/run/ToSort/Liaison.php.md:- `public function testAddMethods()`
docs/api/test/run/ToSort/Liaison.php.md:- `public function testAddAddonsPackageAddons()` Checks namespacing & structure of addons property with lia, a package, and an addon
docs/api/test/run/ToSort/Liaison.php.md:- `public function testAddAddonsPackage()` Checks namespacing & structure of addons property with lia & a package
docs/api/test/run/ToSort/Liaison.php.md:- `public function testPackageConfig()`
docs/api/test/run/ToSort/Liaison.php.md:- `public function testDirectConfigsAccess()`
docs/api/test/run/ToSort/Liaison.php.md:- `public function testNamespaceConfigs()`
docs/api/test/run/ToSort/Liaison.php.md:- `public function testPackageAddonConfig()`
docs/api/test/run/ToSort/OldTests.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/OldTests.php.md:- `public function testPrefixScanning()` The flow of how scanning & prefixes work. This is all abstracted away now and internals can change.
docs/api/test/run/ToSort/Prefixes.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Prefixes.php.md:- `public function testHookOnPrefix()`
docs/api/test/run/ToSort/Server.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Server.php.md:Test the fully-functional server
docs/api/test/run/ToSort/Server.php.md:- `public function testDynamicUrl()`
docs/api/test/run/ToSort/Server.php.md:- `public function testUsesCorrectTheme()`
docs/api/test/run/ToSort/Server.php.md:- `public function testCachedCssFile()`
docs/api/test/run/ToSort/Server.php.md:- `public function testStaticFile()`
docs/api/test/run/ToSort/Server.php.md:- `public function testServer()`
docs/api/test/run/ToSort/AddonStructure.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/AddonStructure.php.md:- `public function testServerPackage()`
docs/api/test/run/ToSort/AddonStructure.php.md:- `public function testInLiaison()`
docs/api/test/run/ToSort/AddonStructure.php.md:- `public function testInPackage()`
docs/api/test/run/ToSort/AddonStructure.php.md:- `public function testStandalone()`
docs/api/test/run/ToSort/Documentation.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Documentation.php.md:They are tests in order to be verifiable - not in order to actually test features.
docs/api/test/run/ToSort/Documentation.php.md:- `public function testOverwriteView()`
docs/api/test/run/ToSort/Documentation.php.md:- `public function testAddonStructure()`
docs/api/test/run/ToSort/QualityOfLife.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/QualityOfLife.php.md:- `public function testAddonGetter2()`
docs/api/test/run/ToSort/QualityOfLife.php.md:- `public function testAddonGetter()` I want to access addons by a fully-qualified name
docs/api/test/run/ToSort/QualityOfLife.php.md:- `public function testAddon__get()`
docs/api/test/run/ToSort/ServerPackage.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/ServerPackage.php.md:- `public function testConfigFile()`
docs/api/test/run/ToSort/Bugs.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort/Bugs.php.md:- `public function testViewLiaObj()`
docs/api/test/run/ToSort/Bugs.php.md:- `public function testViewAddsChildResources()` Happening on taeluf.com. I have a `theme.php` view & associated `.css` and `.js` files in `theme/` dir. I think the files are all being added to `resources` addon, BUT they're NOT being output to the cached css file
docs/api/test/run/ToSort/Bugs.php.md:This test FAILED to re-create the bug. So I realized that resource files were being added AFTER the theme view was being `require`d. I moved the code around & now it works. I have not added a test for this.
docs/api/test/run/ToSort/Bugs.php.md:- `public function testCacheDirPropagation()` When updating taeluf.com, resources weren't loading because cache dir wasn't set. I set the cache dir AFTER creating server & that worked. Then the routes weren't working & I found Resource's route...() method was not being setup through scan('route'); So I added an `onPackageReady()` feature to do the scanning after a package is all set up. Now, route...() gets called, but the cache dir isn't set yet. So now the routes can't setup.
docs/api/test/run/ToSort.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ToSort.php.md:- `public function testViewGlobalArgs()`
docs/api/test/run/unit/FastFileRouter.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/unit/FastFileRouter.php.md:- `public function testMakeExtMap()` used to generate a mimetype map from array into one file for each extension
docs/api/test/run/unit/FastFileRouter.php.md:- `public function testCssFile()`
docs/api/test/run/unit/FastFileRouter.php.md:- `public function testGetParams()`
docs/api/test/run/unit/FastFileRouter.php.md:- `public function testEndingSlash()`
docs/api/test/run/unit/FastFileRouter.php.md:- `public function testDotDot()`
docs/api/test/run/unit/FastFileRouter.php.md:- `public function testFastRoute()`
docs/api/test/run/ServerMinimal.php.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/api/test/run/ServerMinimal.php.md:- `public function testViewPage()`
docs/api/test/run/ServerMinimal.php.md:- `public function testIndex()`
docs/History/2021-Question-Component.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/History/2021-Question-Component.md:---
docs/History/2021-Question-Component.md:- Views
docs/History/2021-Question-Component.md: - Page (view the question & all of it's answers)
docs/History/2021-Question-Component.md: - Compose (Create/Edit a question)
docs/History/2021-Question-Component.md: - List (To show multiple questions on an 'Office' or 'Candi' page)
docs/History/2021-Question-Component.md: - or does this go in Office?
docs/History/2021-Question-Component.md: - ListItem (that which is shown in the list)
docs/History/2021-Question-Component.md:- RDBModel
docs/History/2021-Question-Component.md:- Schema (defined by Views/Compose)
docs/History/2021-Question-Component.md:- Routes
docs/History/2021-Question-Component.md:- Backed-up-db (would this go in the component?)
docs/History/2021-Question-Component.md:- PHP helper code, as needed
docs/History/2021-Question-Component.md:- view
docs/History/2021-Question-Component.md:- class
docs/History/2021-Question-Component.md:The routes would be set via the public-dir. The `submit` script would become '$this->component('Question')->submit($_POST);`
docs/History/2021-Question-Component.md:2) How do I tell Liaison to deliver the `Compose` view at `/question/(question-slug:question-id)?/(\?office_id=office-id)?`
docs/History/2021-Question-Component.md:3) How do I tell Liaison (& other parts of the component) that the submit-url is `/question/submit/`?
docs/History/2021-Question-Component.md:4) How do I specify a base-url for the compoment?
docs/History/2021-Question-Component.md: * - FILE_CHAR URL_CHAR USE
docs/History/2021-Question-Component.md: * - . /
docs/History/2021-Question-Component.md: * - @ @POST, @GET... specify valid request types
docs/History/2021-Question-Component.md: * - [] OPTIONAL url paramater. EACH [\_a-zA-Z]+ becomes same-name PHP variable. [^\_a-zA-Z]+ uses standard character-substitution (like `.` replaced with `/`)
docs/History/2021-Question-Component.md: * - () REQUIRED url paramater. Otherwise SAME AS `[]`
docs/History/2021-Question-Component.md: Example url: /city-council/mayor/
docs/History/2021-Question-Component.md: a) $office = city-council && $position = mayor
docs/History/2021-Question-Component.md: b) OR $officePosition = city-council/mayor
docs/History/2021-Question-Component.md: - `Public/` - Place files in the public directory with the naming convention below
docs/History/2021-Question-Component.md: - `Route/` - Every `php` file will be `include`d & `$route` object can be called to create routes
docs/History/2021-Question-Component.md: - `Task/` - A task can be registered to run & tasks can basically do anything
docs/History/2021-Question-Component.md: - `/init.php` - `init.php` is `include`d every time a component is loaded & can do anything
docs/History/2021-Question-Component.md: - `/init-once.php` is `include`d the FIRST time the component is loaded on a request... and can do anything
docs/History/2021-Question-Component.md: - `Lia/Component.php` - The optional `Component` class can override the default `Component` class & use overridden methods to do certain things, as the Component loading process specifies
docs/History/2021-Question-Component.md: - `@METHOD` specifies the method(s) to respond to. Such as `@POST@GET`.
docs/History/2021-Question-Component.md: - If none is specified, Only GET requests are allowed
docs/History/2021-Question-Component.md: - This MUST be at the beginning of the file name
docs/History/2021-Question-Component.md: - The method list is terminated with a `.`
docs/History/2021-Question-Component.md: - `$paramater` - `paramater` (in the file name) must match REGEX `[a-zA-Z0-9\_]+\#?`.
docs/History/2021-Question-Component.md: - Any character NOT matching this terminates the dynamic portion of the url & is a literal character
docs/History/2021-Question-Component.md: - `#` terminates the param name but IS NOT a literal character. You can subsequently add another `#` after the terminating `#` to have a literal `#`
docs/History/2021-Question-Component.md: - Ex: file `$pet1##$pet2` responds to url `/cat#dog/`
docs/History/2021-Question-Component.md: - `$¶mater` declares an optional paramater.
docs/History/2021-Question-Component.md: - `.` declares a `/` in the url
docs/History/2021-Question-Component.md: - `..` or `literal.$&optional.php` (where the optional param is not present) will be handled as a single `.`...
docs/History/2021-Question-Component.md: - How do I do a literal `.` in the url? Or a literal `$`? or literal `&`
docs/History/2021-Question-Component.md: - V1: No `.` in urls. No `$` in urls
docs/History/2021-Question-Component.md: - V2:
docs/History/2021-Question-Component.md: - Maybe `&.`?
docs/History/2021-Question-Component.md: - and `&$` ?
docs/History/2021-Question-Component.md: - and `&&` ?
docs/History.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/History.md:---
docs/History.md:2. Server setup: Database configuration, other non-liaison things
docs/History.md:3. `$lia = new Liaison()` <- Liaison adds its built-in package (or pass `['bare'=>true]`)
docs/History.md: 2. `$Component->onCreate()` <- Called from `\Lia\Compo`
docs/History.md: 3. `$Component->onReady()` <- Called from `\Lia\Compo`
docs/History.md: 4. `$Component->onComponentsLoaded()` <- After all components in THIS package have called `onCreate` & `onReady`. Called by `\Lia\Package`
docs/History.md: 5. `$Component->onPackageReady()` <- After routes, views, & configs have been loaded for this package
docs/History.md: - `$Component->onPrePackageReady()` is called first, but is not recommended. If used, you must call `parent::onPrePackageReady()` to keep prefix scanning enabled
docs/History.md:5. `$lia->deliver()` calls `$lia->getResponse()` (the following is all called from `\Lia\Compo\Server`)
docs/History.md: 1. `$lia->emit('PreAllPackagesReady')`
docs/History.md: 2. emit `AllPackagesReady` <- Handle in components by declaring `onEmitAllPackagesReady()`
docs/History.md: 8. `if ($response->useTheme)`, load theme, emit `ThemeLoaded($themeView)`, then set `$response->content` to `(string)$themeView`
docs/History.md:6. `$lia->deliver()` has a response
docs/History.md: 1. `$response->sendHeaders()`
docs/History.md: 2. `if ($response->sendContent) echo $response->content`
docs/README.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
docs/README.md:`v0.6` will be the next version & will come with major internal changes but likely will not have any significant changes to the API. The current version has Package & Addon as sub-classes of Lia. Also, there are MANY properties by-reference. These complexities are slow & confusing. In the new version, Packages & Addons will likely not extend from Liaison any further. And by-reference properties will be removed.
docs/README.md:`v0.5` marks the official beta. Software-wise, it's basically ready to go. Documentation wise, it's pretty poor. There are some weird things in here that will make it hard for you to use to it's full ability until I finish writing proper documentation. There's also some minor code issues in Liaison that I do need to fix.
docs/README.md:1. Write a deliver script, such as `deliver.php`. Comment out the `require add-route.php` line
docs/README.md:require(__DIR__.'/add-route.php');
docs/README.md:$lia->deliver();
docs/README.md:3. Start the server: `php -S localhost:3000 deliver.php`. Visit `http://localhost:3000/` in your browser
docs/README.md:Ideally, write tests to ensure your site works as expected. See [test/run/ServerMinimal.php](/test/run/ServerMinimal.php) for simple examples. I use [php/tester](https://tluf.me/php/tester), but [Php Unit](https://phpunit.de/) is the popular go-to for php testing
docs/README.md:5. Write a route in your `deliver.php` file. Alternatively, make a public file `public/{slug}.php` and `echo $view` instead of `$response->content = $view`;
docs/README.md:$lia->addRoute('/{article}/',
docs/README.md: $slug = $route->param('article');
docs/README.md: $view = $lia->view('ArticlePreview', $articles[$slug]);
docs/README.md: $response->content = $view;
docs/README.md:<?=$this->getHeadHtml()?>
docs/README.md:- `Lia` manages methods, addons, and properties
docs/README.md:- `Lia\Package` is a base class for packaging addons together
docs/README.md:- `Lia\Addon` is a base class for writing addons
docs/README.md:- `Lia\Package\Server` helps deliver websites by tying together main addons (public files, views, cache, autoloading, and more)
docs/README.md:- dir `code/class/Object/*` are objects used by built-in components
docs/README.md:- dir `code/class/Utility/*` are Utility classes
docs/README.md:- dir `view/theme` provides a default theme
docs/README.md:- dir `file/mime_type_map.php` is just that
docs/README.md:- Autoloader: loads classes within given directories
docs/README.md:- Cache: cache key/value pairs & files
docs/README.md:- Error: Report errors to users
docs/README.md:- Hook: register & call hooks (very generic form of extensibility)
docs/README.md:- Redirect: Redirect requests
docs/README.md:- Resources:
docs/README.md: - Add css & js files, urls, and/or code blocks to a request
docs/README.md: - Sorting api to set order of resource files in compiled output
docs/README.md: - Routes to compiled resource files
docs/README.md: - Manages seo information (this should go in a new component)
docs/README.md: - Outputs headHtml (must be called)
docs/README.md: - Passes compiled files to cache component
docs/README.md:- ResourceSorter: A wrapper around the `Resources` sorting api, to make it easier
docs/README.md:- Router: Set pattern & static routes. Parse paramaters from urls. Process url for route target (package, callable, file)
docs/README.md:- Server: Handles request delivery
docs/README.md: - Helps all the addons work together to respond to a url
docs/README.md: - delivers static non-php files
docs/README.md:- View: Display re-usable scripts/templates
docs/README.md: - config.json <- Package settings
docs/README.md: - public/ <- Public files to be routed to. Ex: `public/contact.php` routes to `/contact/`
docs/README.md: - view/ <- Views
docs/README.md: - addon/ <- Addons (generally extending from \Lia\Addon)
docs/README.md: - class/ <- Classes to autoload, PSR4 style. Will be converted to classmap style later
docs/README.md: - cache/ <- Dir to store cache files. Only one cache dir is used (each app does not get its own)
docs/README.md:- Environment-dependent features are not built-in, but I recommend my [php/env](https://tluf.me/php/env)
README.md:<!-- DO NOT EDIT. This file generated from template by Code Scrawl https://tluf.me/php/code-scrawl/ -->
README.md:`v0.6` will be the next version & will come with major internal changes but likely will not have any significant changes to the API. The current version has Package & Addon as sub-classes of Lia. Also, there are MANY properties by-reference. These complexities are slow & confusing. In the new version, Packages & Addons will likely not extend from Liaison any further. And by-reference properties will be removed.
README.md:`v0.5` marks the official beta. Software-wise, it's basically ready to go. Documentation wise, it's pretty poor. There are some weird things in here that will make it hard for you to use to it's full ability until I finish writing proper documentation. There's also some minor code issues in Liaison that I do need to fix.
README.md:1. Write a deliver script, such as `deliver.php`. Comment out the `require add-route.php` line
README.md:require(__DIR__.'/add-route.php');
README.md:$lia->deliver();
README.md:3. Start the server: `php -S localhost:3000 deliver.php`. Visit `http://localhost:3000/` in your browser
README.md:Ideally, write tests to ensure your site works as expected. See [test/run/ServerMinimal.php](/test/run/ServerMinimal.php) for simple examples. I use [php/tester](https://tluf.me/php/tester), but [Php Unit](https://phpunit.de/) is the popular go-to for php testing
README.md:5. Write a route in your `deliver.php` file. Alternatively, make a public file `public/{slug}.php` and `echo $view` instead of `$response->content = $view`;
README.md:$lia->addRoute('/{article}/',
README.md: $slug = $route->param('article');
README.md: $view = $lia->view('ArticlePreview', $articles[$slug]);
README.md: $response->content = $view;
README.md:<?=$this->getHeadHtml()?>
README.md:- `Lia` manages methods, addons, and properties
README.md:- `Lia\Package` is a base class for packaging addons together
README.md:- `Lia\Addon` is a base class for writing addons
README.md:- `Lia\Package\Server` helps deliver websites by tying together main addons (public files, views, cache, autoloading, and more)
README.md:- dir `code/class/Object/*` are objects used by built-in components
README.md:- dir `code/class/Utility/*` are Utility classes
README.md:- dir `view/theme` provides a default theme
README.md:- dir `file/mime_type_map.php` is just that
README.md:- Autoloader: loads classes within given directories
README.md:- Cache: cache key/value pairs & files
README.md:- Error: Report errors to users
README.md:- Hook: register & call hooks (very generic form of extensibility)
README.md:- Redirect: Redirect requests
README.md:- Resources:
README.md: - Add css & js files, urls, and/or code blocks to a request
README.md: - Sorting api to set order of resource files in compiled output
README.md: - Routes to compiled resource files
README.md: - Manages seo information (this should go in a new component)
README.md: - Outputs headHtml (must be called)
README.md: - Passes compiled files to cache component
README.md:- ResourceSorter: A wrapper around the `Resources` sorting api, to make it easier
README.md:- Router: Set pattern & static routes. Parse paramaters from urls. Process url for route target (package, callable, file)
README.md:- Server: Handles request delivery
README.md: - Helps all the addons work together to respond to a url
README.md: - delivers static non-php files
README.md:- View: Display re-usable scripts/templates
README.md: - config.json <- Package settings
README.md: - public/ <- Public files to be routed to. Ex: `public/contact.php` routes to `/contact/`
README.md: - view/ <- Views
README.md: - addon/ <- Addons (generally extending from \Lia\Addon)
README.md: - class/ <- Classes to autoload, PSR4 style. Will be converted to classmap style later
README.md: - cache/ <- Dir to store cache files. Only one cache dir is used (each app does not get its own)
README.md:- Environment-dependent features are not built-in, but I recommend my [php/env](https://tluf.me/php/env)
Status.md:- review this 600+ line file & relegate most stuff into a history.md file or just delete it. Really, most of it need not be read, such as the day-to-day updates that are written lengthily.
Status.md:- benchmark diff between an object calling another object implementing interface vs an object calling a method in an array through `__call()` ... if the interfaced approach is significantly faster, then perhaps Liaison is just a complete bust & i should abandon it (though i'm not likely going to)
Status.md:There is also some quality-of-life stuff i'd like to do
Status.md:1. by-reference properties
Status.md:2. multi-dim properties array
Status.md:- rewrite `get()` to retrieve an addon & then return a property of the addon
Status.md: - maybe return this by-reference??
Status.md:- rewrite `set()` to retrieve an addon & then set the property to the addon
Status.md:- rewrite `append()` basically same way as `set()`
Status.md:- I don't know what to do about `default()`
Status.md: - i COULD still have a `props` array that just stores `namespace:dot.property=>value` instead of using nested arrays with by-reference
Status.md:- rewrite `dump()` to retrieve all public properties from all addons manually & ... well dump doesn't need to be performant at all bc it is very limited debugging purposes
Status.md:- remove `copy()` method
Status.md:- `setup()` method: I might add a separate `setup()` method for addons & packages that is called after the constructor so that configuration can be done after instantiation, before initializing everything
Status.md:- ... idk ... there's other things.
Status.md:- extending from `Addon` should never be required to integrate a method or hook with liaison
Status.md:- The `Addon` class should have some nice convenience for setting up addons:
Status.md: - shared methods
Status.md: - add self to liaison->addons[]
Status.md: - shared properties
Status.md: - hooks
Status.md: - built-in hooks for like `onCreated`, `onPackageReady`, `onServerReady`
Status.md:- maybe hooks should be a part of liaison's core
Status.md:2. Extremely easy on-boarding
Status.md:3. Integrate with non-liaison websystems
Status.md:`phptest -class Benchmark` with 100,000 loops yields:
Status.md:- InterfaceObjectUsingCall 34.4930ms
Status.md: - almost all of the slowdown appears to be due to `__call()` routing rather than due to using callabls. WOW
Status.md:- InterfaceObject 12.4068ms
Status.md:- ArrayMethods 36.6769ms
Status.md:- ArrayMethodsWithFunctions 32.2399ms
Status.md:- InstantiateInterfaceObject 8.9591ms
Status.md:- InstantiateArrayMethods 18.4569ms
Status.md:- InstantiateArrayMethodsWithFunctions 22.5091ms
Status.md:An additional problem with this is: interfaces make it really easy to properly document what methods do & how they are used. This array-methods approach does NOT make it easy to communicate what the method must do.
Status.md:- re-implement addon base class (1-2 hours?)
Status.md:- delete some tests that explicitly test current liaison features (30 minutes)
Status.md:- ideally these internal changes will not cause any breakage in tests
Status.md:- re-implement liaison get/set (30-60 minutes)
Status.md:- constructor changes in every single addon (1-3 hours)
Status.md:- new package base class? & update constructors (1-2 hours)
Status.md:- new tests for new internal implementation (1-2 hours)
Status.md:- In all my foss libs and websites using liaison, create a new branch & bump the liaison version (2-3 hours)
Status.md: - maybe write a simple bin script that creates a new branch & bumps the version so i can do it automatically, but that would probably be a waste of my time
Status.md:- Unforseen stuff (4-6 hours)
Status.md: - potential changes in liaison libraries
Status.md:---------
Status.md:- make `$package` available in a view (being the same package that the view came from)
Status.md:- make new packages not override lia:server.package
Status.md:- having `addon->name` not match `addon->fqn` causes it not to be added to liasion...
Status.md:- Redirect addon directly calls `header()` instead of using a hook to modify the response before headers are sent by the server addon.
Status.md:- Ex: `POST /user/register` redirects to `/user/register/` which breaks the POST. Maybe allow `POST` to work with or without trailing slash?
Status.md:- added dump() method
Status.md:- server package now adds itself to fqn_addons: This is likely to cause problems as is uses `$this->fqn` in the constructor. So if you instantiate two server packages, the 2nd server package will overwrite ... this is bad. But it's how it is for now & it does not cause a breaking change.
Status.md:- add a default cache dir so it works out of the box
Status.md:- recently added MinimalServer test for documentation purposes
Status.md:- add `no-cache` header to most responses
Status.md:- 3 tests are failing ... fix them!
Status.md:- my immediate cache invalidation is not working (at least on reedybear.com), so i have to manually delete the cache dir for every css change. fix this!
Status.md:- Write docs for:
Status.md: - create a new app
Status.md: - add a css or js file to the request
Status.md: - .... stuff
Status.md:- v0.5: Uses `Addon`s instead of `Compo`s. Much more direct access to methods, properties & major overhaul. Internally uses a lot of memory pointers. All addons ARE liaison instances. Packages are too. Lots of other changes. Dec 8, 2021: Under development, nearly ready
Status.md:- v0.4: abandoned ... WAS intended to do what v0.5 is while providing backward-compatability to v0.3 setups ...
Status.md:- v0.3: abandoned. Uses `Compo`s (Components). A major version ... used `->api('namespace:key', $arg1, $arg2)` all over the place ... abandoned dec 8, 2021
Status.md:There are other things that ought to be inspectable, too - views, routes, resources, idk what else
Status.md:$lia->set('server.cache.dir', $server_dir.'/cache/');
Status.md:- added `code/class/Router/FastFileRouter.php` with an extremely simple and fast routing mechanism for files in a directory
Status.md:- added `code/file/mime_types/*.txt` where there's a file for every extension & the file only contains the mimetype
Status.md:- FastRoute was added to the test server deliver script
Status.md:- a dynamic portion of a url cannot contain `-` by default. this is BAD ... slugs contain hyphens, silly
Status.md:- must explicitly add views for a package like: ... not true ... the dir just needs to be `/view/` & this is not clear
Status.md: - `$view = $lia->addon('lia:server.view'); $view->addDir($site->dir.'/views/', $site);`
Status.md:- `$lia->set('server.cache.dir', $dir)` must be called BEFORE the main server package is setup
Status.md:- use `\Lia\Package\Server` for most setups ... but it's not obvious
Status.md:- WARNING: when cache dir is not set, now an exception is thrown, instead of just returning false ... somewhere in the cache addon class ... several tests are failing ... I should address this. I might have to roll back. idk
Status.md:- i attempted toa dd global args to view, but I commented out the code & just didn't finish it.
Status.md:- review dec 16 TODOs & CONSIDERs
Status.md:- add header('Cache: no-cache') to all requests that are NOT static-file requests
Status.md:- DONE view/theme priority (new views always overwrite null-namespace)
Status.md:- DONE for `view/theme.php` also add `view/theme/*.css` & `theme/*.js`
Status.md:- DONE make `$lia->server` access `$lia->addons['server']` & `$lia->server->cache` would access `$lia->addons['server']->addons['cache']`
Status.md:- DONE: add `config.json` file to app dir for server-package
Status.md: - DONE: Test it
Status.md:- DONE: Add fqn for addons, like `lia:server.cache` that is accessible from ALL liaison objects by that string. Maybe `$lia->addon('lia:sever.cache')`...
Status.md:- DONE: fix confusion around `addon->addon_name` & `addon->name`;
Status.md: - removed `addon_name` and only using `addon->name` now
Status.md:- DONE??: fix `_lia` scoping. The lia object passed to views is NOT the root object.
Status.md: - i couldn't reproduce the bug with my test. The bug came from taeluf.com
Status.md:- TODO: Add a logging feature! Just to log messages to a file.
Status.md:- TODO?? `debug` feature to help inspect addons, properties, and more... ?
Status.md:- TODO: `$this->depend('lia:server.cache')` feature (or `$this->depend(\Lia\Addon\Cache)`?)
Status.md:- TODO: review disabled tests & get them passing or remove them
Status.md:- TODO: Add robust setup-events for packages/addons
Status.md: - all addons within package are loaded
Status.md: - all other packages are loaded
Status.md: - everything is ready
Status.md:- TODO: Add global objects ... example: `mdblog->blog` would fit well at `lia->blog`
Status.md:- CONSIDER: Does server package REALLY need the default server package to be added in order to function at all?
Status.md:- CONSIDER: Should `fqn_addons[ns:package.addon-name]` also have null-ns, like views do? (leaning yes, but let's wait til I need it)
Status.md:- CONSIDER: Removing `name` from constructor for addons, package, lia. Subclasses generally don't need them ... but then again the server package needs it.
Status.md:- CONSIDER: Should `package->name` be overwritten by `config.json[name]`?
Status.md:- add `onPackageReady()` to addons, called by `\Lia\Package->ready()`, which is NOT called during the package constructor, but IS called during the Server package constructor
Status.md:- I was having issues with `_lia` scoping ... (maybe see mdblog? idr)
Status.md:- I want addons to be accessible via `__get()` & `__set()`
Status.md:- `Server` package should default it's name to `server`
Status.md:- Should hook become part of liaison proper? (i lean yes) also maybe error & cache? No, cache is thicc. Error logging, maybe? Maybe
Status.md:- TODO: Add a logging feature! Just to log messages to a file.
Status.md:- I was last working in MdBlog addon ... go look at that
Status.md:- Review Server PACKAGE and ensure some simplicity
Status.md: - should the server ADDON be a package? (leaning no)
Status.md:- need a way to have addons always be stored in their namespace-form, like `lia:server.hook` or `lia:server.seo`, etc... So I can have a guaranteed way to reference an addon. Probably just use those simple string keys. Could use an `addon()` function to retrieve them from current data structuer?
Status.md:- i'm not in love with how I set up addons ... idunno ...
Status.md:- name/addon_name is still a mess & just needs some thinking & review & updating
Status.md:- I was working on the server integration test. It is failing, only because the test needs updated. Parts of getting this working:
Status.md: - Wrote `code/Server.php` (server PACKAGE)
Status.md: - add `addDir()` to view addon
Status.md: - add `dir_to_patterns()` to router addon
Status.md: - messed with the addon nesting in package (maybe in lia too?)
Status.md: - fixed the built in theme view & error/header view
Status.md: - wrote test/Server/deliver.php
Status.md: - wrote test/run/Server (needs corrected)
Status.md:- `Package->name & package->addon_name & Package::__construct($lia, $package_name)` ... confusion, uncertainty, duplication ... the nesting of `->addons` is ... idk.
Status.md:- need unit test in router for dir-to-patterns & it's helper function(s)
Status.md:- `PackageAddonIntegration` test is failing. Several Liaison tests are still disabled.
Status.md:- the ExceptionCatcher is ... bad
Status.md: - in `set_error_handler`, i need to call `ExceptionCatcher::throw(new ErrorException(...))`, instead of re-throwing there
Status.md:- need to test view conflicts
Status.md:- Error header message test is passing because I added an explicit print to the test theme view. I don't know if this is how I want it to work. I need to review this with a fresh mind. Also, the display is checking `$this->lia->addons['error']->headerMessage` which ... is probably the wrong way to do things.
Status.md:- Error Addon: Started on it ... one test passing ... needs some TLC to get things sorted
Status.md:- Error addon:
Status.md: - Review & Update
Status.md:- Server addon:
Status.md: - test the hooks
Status.md: - test deliver() method?
Status.md: - general refactor so it just ... makes more sense
Status.md:- implement Resource addon tests DeliverJs & DeliverCss after Server is re-done
Status.md:- Check Server integration for:
Status.md: - Resources
Status.md: - ResourceSorter
Status.md: - Autoload
Status.md:- completely get rid of the response & request objects (& maybe Route object)
Status.md: - refactor router
Status.md: - refactor server
Status.md: - refactor resources
Status.md:- Resources addon changes:
Status.md: - Remove `forceRecompile` config (only using `useCache`)
Status.md: - `recompileJsAfter` & css is removed (these weren't implemented anyway!)
Status.md: - refactor ??
Status.md:- refactor seo addon
Status.md:- refactor (slightly) & clean up (massively) and document router addon. Add new (simpler) router addon tests. Separate old router tests into RouterOther tests (bc they are sloppy & I don't want to refactor them).
Status.md:I feel a bit uneasy about the work I did today. Everything is working - tests are passing ... but I just feel like some things are undone. I think I want to review, at least, the router addon & look for any `api()` calls, at the very least.
Status.md:I also may want to add additional tests - like testing that seo & router work with package & work with `liaison -> package -> addons` setup
Status.md:- Seo Addon
Status.md: - converted to addon
Status.md: - tests passing (fixed one old one)
Status.md: - no exception catcher
Status.md:- Router Addon
Status.md: - all tests passing (including ones that I had failing previously)
Status.md: - no exception catcher ...
Status.md: - converted to addon
Status.md:- Cache Addon
Status.md: - added an exception catcher case
Status.md:- View addon
Status.md: - all tests passing
Status.md: - added to exception catcher
Status.md: - docs written (docblocks)
Status.md:- add hook handling to exception catcher
Status.md:- add scan() method to liaison
Status.md:- add prefix integration to hook
Status.md:- add hook to package test
Status.md:- move GlobalParam to old folder (likely will not use)
Status.md:- add prefix/scan test class
Status.md:- add OldTests test class
Status.md:- IDEA: Scanner should be an addon & `depends` feature will make it so easy to use
Status.md: - NO. Scanner is fundamental to Liaison.
Status.md:- LATER: create a liaison test that creates multiple packages so that they work together.
Status.md:- LATER: Add prefix scanning for Hook after implementing it.
Status.md:- LATER: (i disabled the tests) The cache class & tests are all passing. `AddMethods` & `AddDotMethods` are still failing on the Liaison test. I think I removed nesting of methods on Monday?? This will need addressed, but I want to focus on the addons and making sure new Lia provides what they need, instead of getting caught up on what Lia "should" do. So I'll revisit this decision later after I've written more tests & used Lia more
Status.md:- LATER: (i disabled the tests) Package tests `AddAddonsPackageAddons` & `AddAddonsPackage` are failing because I used to have `$lia->addons['ns']['package'] = $package`, but I removed it ... because it caused a test to fail & it just didn't FEEL right having it there. But now I see / remember why it was. I don't know what I prefer. Maybe add a `packages` property to `Lia` to hold packages. Maybe keep the package in the addons list. I don't know. I'll write more tests, see what feels right in practice & re-visit this decision. I will not fix the tests until then.
Status.md:-
Status.md:- NOW? I want to start a new Package class who's entire job is to setup addons & invoke them. I want a base package class for use on any Liaison setup, then a Server package that ties together all the built-in components into a web-server (which is kind of what the old Package does).
Status.md:- DONE I want to rename `configs` to `props` because ... I think it is more intuitive
Status.md:Success! I re-wrote the autoloader & autoloader tests. I started rewriting cache & its tests. Cache is successfull for everything I've re-implemented. Notes:
Status.md:- main cache: set() get(), write(), read()
Status.md: - this is a new feature to set key=>value pairs
Status.md: - it uses the config stack that exists from liaison & essentially writes $lia->configs['cache'] to disk as php
Status.md:- classic file cache: I have not touched it yet & its tests are currently failing
Status.md:I have properties declared on both Autoloader & Cache, which each of them use directly. In their constructors, each addon is setting those properties to `$addon->prop_name = &$this->configs['prop_name']`. I REALLY like this so far, bc it makes a tree of all the values that are set & need to be set. I have no idea about the performance ... But I imagine it's not too bad.
Status.md:- finish updating the cache tests & cache class. I do want to keep the ability to cache files. The code needs re-factored & other than that ... I think it's basically fine. I want a `cache_file` method on liaison as well.
Status.md:So the entire thing exists to server addons. Addons need to be able to communicate with other addons. Packages helps set things up. Liaison does the actual communication. User-land code ALSO needs to be able to communicate with addons.
Status.md:- Addons provide functionality and need to communicate with (and depend upon) other addons
Status.md:- Packages provide utility that makes it easier to set up multiple addons
Status.md:- Liaison is the object which provides communication featurse between addons
Status.md:- User-land code uses Packages to setup addons & uses Liaison to access those addons.
Status.md:- Addons are simply a way of packaging features together. Ex: Cache addon has a suite of functions to handle caching. Alternative Ex: Several cache functions exist & user-land code just registers them to Liaison, no addon needed. This is NOT the intent, but it's how it ought to work.
Status.md:- `$lia->method_name();` calls whatever method was registered
Status.md:- `$lia->methods[method_name]();`
Status.md:- `$lia->prop_name` gets whatever value is registered at `$lia->props[prop_name]`
Status.md:- `$lia->props[prop_name]`
Status.md:- `$lia->addons['name']` gets whatever addon is registered
Status.md:- `$lia->packages['name']` gets whatever package is registered
Status.md:- `$lia->packages['name']->addons['name']` gets an addon from a package
Status.md:- `$lia->get('ns.name.prop')` gets `$lia->packages['ns']->addons['name']->prop` where `->prop` is a real property on the addon?
Status.md:- `$this->lia->cache()` to call the global cache method
Status.md:- `$this->lia->call('pkg.addon.cache')` to call a specific addon's cache method
Status.md:- `$this->lia->packages['pkg']->addons['addon']->cache()` to call the specific addon's cache method
Status.md:- shorthand: `$this->lia->addons['cache']->cache()` to get the global cache object & call its method
Status.md:- global methods (set by anyone, normally by addons)
Status.md:- global objects (set by anyone, normally by addons or packages)
Status.md:- global properties (set by anyone, normally by addons or packages)
Status.md:- namespaced methods
Status.md:- namespaced objects
Status.md:- namespaced properties
Status.md:`$lia->configs->methods();`
Status.md:or by `$lia->config_method` where the config objects' method has been explicitly set to liaison
Status.md:- one object from which I can access:
Status.md: - all packages
Status.md: - all addons
Status.md: - all root-set properties
Status.md: - all root-set methods
Status.md:- Does it need to support:
Status.md: - $lia->get('addon.propname')?
Status.md: - $lia->call('addon.methodname')?
Status.md: - $lia->addons['name']->method();
Status.md: - $lia->packages['name']->addons['name']->method();
Status.md: - $lia->addons['name']->property
Status.md: - $lia->packages['name']->addons['name']->property
Status.md: - $lia->set('pkg.addn.property', 'value');
Status.md: - calls $lia->packages['pkg']->addons['addn']->property = value;
Status.md: - $lia->set('pkg.addn.property', 'value');
Status.md: - $lia->configs['pkg]['addn']['property'] = $value;
Status.md: - $package->configs === $lia->configs['package']
Status.md: - $lia->addons['pkg']->addons['addn']->property = $value;
Status.md: - $lia->call('pkg.addn.method',$arg1,$arg2)
Status.md: - $lia->methods['pkg']['addn']['method']($arg1,$arg2)
Status.md: - (would be) $lia->addons['pkg']->addons['addn']->method($arg1,$arg2);
Status.md:v0.5 is like v0.4 except I'm abandoning the entire backwar-compatability idea. I'm going to re-code tests & addons using the new setup instead of trying to make it all fit seamlessly with the old setup.
Status.md:Think about my approach to this refactor. I've spent several hours and a lot of energy making everything backward compatible. It's kind of a nightmare. So I'm not entirely sure how I want to go about things. I may go away from the "constant BC" route & just dive full-in. I really don't want everything to break at once, because fixing THAT will be a nightmare. I WANT to go through pieces of this library one at a time, switching things out as I need. Fuck. I might rewrite some tests too. Idunno. Its the end of the day and it all sounds terrible lol. Need to re-asses with a fresh mind.
Status.md:- meh ... "Function name must be a string": Running into this issue because there is a null value at the location a method should exist. Why/how does that null value happen? Can I catch the error with my fancy exception handler?
Status.md:- Start turning the components into Addons, one at a time. They will subclass liaison. It will be interesting.
Status.md:- package is a subclass of addon & addon a subclass of Liaison, but they have significantly different needs, so the constructors don't call parent::constructors. Instead they call `$this->copy()` which should be a bit more consistent in how it operates between liaison subclasses.
Status.md: - perhaps package should not be a subclass of addon?
Status.md:- DONE setup by-ref properties
Status.md:- DONE add methods
Status.md:- DONE add api()
Status.md:- DONE add get/set
Status.md:- DONE test all of the above
Status.md:- DONE add addons management
Status.md:- DONE add `->_lia` for root liaison object & `->lia` for parent liaison object
Status.md:- DONE start ExceptionCatcher
Status.md:- DONE get package tests passing (see `Other/OneOffTests.php`)
Status.md:- DONE Get the Scanner tests passing
Status.md: - There are two scanner tests that are NOT passing. Focus on those??
Status.md: - Setup the new scanner trait & `use` it on `Lia` (see notes below)
Status.md:- DONE Start passing individual component tests (one at a time. take it easy. take it slow.)
Status.md:### Re-testing with LiaBC class
Status.md:- DONE some tests are stalling due to re-addition of `lia:config.default` api (see `LiaBC` where this api is added to liaison)
Status.md: - FIXED `OneOffTests->ComponentsAndRequestLifecycle`
Status.md: - done There is an issue with `cacheFile()` getting a `null` dir ... but only for the `css` resources, not the `js`
Status.md: - done spawns from `getHeadHtml()` ... it is a MESSSSSS
Status.md: - FIXED `Redirect->GoTo`
Status.md: - FIXED `Error->ErrorHeader`
Status.md: - FIXED `Error->ErrorPage`
Status.md:- FIXED `OneOffTests` kind of seem like a nightmare ... uhh idunno
Status.md:- WILL NOT FIX `Exceptions` test are failing & I don't think I'm going to fix it.
Status.md:- DONE all the component tests are passing, except for the ones that use a non-bare liaison ... so the only issue now is getting package to work with LiaBC.
Status.md:- DONE `Other/LiaisonApi.php` works. I disabled a couple mediator tests because I don't use mediators ANYWHERE, so it's not worth fixing
Status.md:- DONE `Other/OneOffTests.php`: These are significant integration tets, so these need to go later.
Status.md:- DONE `ScannerTrait` (`test/CompoTrait/Scanner.php`): The old implementation is SUCH a mess. The whole thing is terrible. I think it may be worth rewriting the scanner from scratch with almost no features. It should be VERY simple. The old version uses `$lia->api(...)` to call the prefix handler method... I want to have methods that accept callables for particular purposes (like registering an event). When a prefixed-method is found, it should be passed to that setup-function (event registration, etc).
Status.md: - I made a new scanner trait with minimal modification to sustain backward compatability.
Status.md:- have a list of prefixes
Status.md:- build an array of methods that have those prefixes
Status.md:- pass the methods (`[$this, 'method']`) to the functions responsible for setting up those prefixes
Status.md:- `public array $prefixes = ['on'=>[$event, 'prefix_setup']];`
Status.md:- `get_methods($this)` ... `substr($method_name,0,$prefix_len)==$prefix` ... `$methods = [$prefix=>[list_of_methods_on_this_object]]`
Status.md:- `foreach $methods as $prefix=>$method_name: $this->prefixes[$prefix]([$this, $method_name])`
Status.md: - usually `$this->prefixes` will refer to the root liaison's array of prefixes (because of `$lia->copy()`). BUT any lia object (addons/packages, etc) could have it's own array of prefixes that is not referencing the root.
Status.md:- by-reference properties
Status.md:- via method calls on the Addon class that remap to Liaison methods
Status.md:### Step 1: Prototyping by-ref
Status.md:I want to prototype a new system for having addons call liaison methods. I'm tired of `$liaison->whatever...` & want this to be more streamlined. I want to try copying liaison properties by reference to make it easier.
Status.md: //$package->__construct() will call
Status.md: // $this->copy($lia)
Status.md: // $this->configs = &$lia->configs;
Status.md: // $this->configs['namespace'] = [];
Status.md: // $this->configs = &$this->configs['namespace'];
Status.md: // $addon->__construct() will do:
Status.md: // $this->copy($package) (where packge is a liaison instance)
Status.md: // $this->configs = &$package->configs;
Status.md: // $this->configs['addon_name'] = [];
Status.md: $this->configs = &$this->configs['addon_name'];
Status.md:- Change "compo" to "addon"
Status.md:- Add a system for addons to call liaison via `$this->liaison_method()`
Status.md: - MAYBE make `addon`s into instances of liaison & use by-ref properties
Status.md:- turn `Package` into an `addon`
Status.md:- MAYBE Move 'event's onto Liaison, but call them `hook`s.
Status.md:- MAYBE add dependency hooks onto Liaison proper
Status.md:- MAYBE add scanning onto Liaison proper
Status.md:Rename compo to addon. Add methods to make them work more friendly with liaison. Like get, set, add method, add prefix. Basically remap all the core liaison functions to auto-include ... Namespace & name.
Status.md:Turn package into an addon. It will all be much easier to understand then. Then do i add addons to liaison? Does liaison auto-setup an addon? No. The addon sets itself up. This means different types of addons csn be made. Most of mine will be subclasses.
Status.md:So then package is an addon & basically it sets up dependent addons for certain sub-directories of a dir given to it.
Status.md:So an addon then would do: $lia->addAddon($this, get_class($this)); which invokes $package's $lia->addAddon($addon, $namespace.':'.$addon_name); call which invokes actual $liaison & does $liaison->addons[$addon_name] = $addon; this all.happens during the addon's constructor. In this chain, package can also maintain it's own addon array.
Status.md:Then in my addon's constructor, it will do $this->addMethod('ownMethodName'). $addon->addMethod($methodNameForLiaison, $ownMethodName=(defaults to arg1)), which will call package's addMethod() which roures directly to liaison.
Status.md:So package would do $lia->configs['namespace'] = [];. Then do this.configs = &lia.configs.'namespace'; so the package's configs directly reference the variable held in liaison. Do the same for addons?
Status.md:Maybe add a copy method to liaison that takes in a liaison object & does the by-ref thing. Package maybe would override copy, call the parent, then do it's own setup. Or just call copy, then do its set up.
Status.md:Now that package is setup by-ref, it will construct the addons & pass itself to the addon. So when the addon does this.methods[name] = this, it's setting it to package's ref of methods prop. (Errr ... Maybe make methods completely flat, but have an api array that is nested.
Status.md:- updated `Route` object to `is_string($target) && is_file($target)`, so `isFile()` doesn't give error when it's non-string target
Status.md:- added basic url normalization to the server component. it needs refactored.
Status.md:- attempted to add `-` & `:` to valid chars to separate dynamic values in a url. But a couple tests are failing, Idk why & it needs to be troubleshot
Status.md:- add https://github.com/matthiasmullie/minify as optional dependency
Status.md: - Tried `cerdic/css-tidy` and had problems
Status.md:## v0.3-candidate Plans
Status.md:- `default()` should be able to receive an array to set multiple defaults at once
Status.md:- Delete all exceptions except for my base exception
Status.md:- add `get` & `set` to Liaison Proper, doing away with `Config` component
Status.md:- Use `$lia->set()` & `get` to store packages, compos, and basically anything that's currently being managed by a single component
Status.md: - Router still needs its own internal data structure
Status.md:- add `arget()` and `arset()` for getting/setting to an array.
Status.md: - `arset('namespace:some.key', 'keyInTheArray', 'valueForKeyInTheArray')`
Status.md: - `arget('namespace:some.key', 'keyInTheArray')` returns `valueForKeyInTheArray`
Status.md: - `get(namespace:some.key)` returns the array containing `keyInTheArray => valueForKeyInTheArray`
Status.md:Since Liaison's goal is to, well, Liaise... I think it should do events, too. It can already to 1-to-1 method calls & I'm adding 1-to-1 property setting / getting. So it would make sense to be able to emit an event. Here's the implementation idea:
Status.md:- `$lia->emit('namespace:Event.Name', arg1, arg2, arg3)`
Status.md: - Internally, it creates `new Event($lia, arg1, arg2, arg3)`. then `$event->emit()`
Status.md: - & this way, the event gets listeners from Liaison, then goes through all of them. & each events listener gets an instance of the event object, plus all the passed args. Any values can be set directly to the event object
Status.md: - You can also directly do `new Event()`... & emit it yourself, without the helper method
Status.md:- add error reporting when a package directory does not exist.
Status.md:- (current) Error Component
Status.md: - Working on error_goto.
Status.md: - Need an Error Route (maybe as a public file, idk. Might make it configurable)
Status.md: - Need to setup test. I started the test, but can't really wrap my head around how to do it.
Status.md:- Improve error views (header & page)
Status.md:- Middleware & Routing
Status.md: - Add a 'handleRequest()' method that allows any component to handle a request
Status.md: - How does the web-developer decide who's handling requests? The `middleware` approach might be best. `addMiddleWare()` & `removeMiddleWare()` could be used by the `Server` component... It might use a couple if statements to determine which middlewares to add. But the flow would be the same regardless.
Status.md:- Caching:
Status.md: - Routes from public files (Router)
Status.md: - Classmap of a package (autoloader)
Status.md:- Cleaner `Route` interface/object
Status.md:- Cleaner `View` interface/object
Status.md:- Refactored Scanner to have only two methods & be more efficient. Updated all tests so they're now passing
Status.md:- `Router` component can have additional routers added to it for custom routing.
Status.md:- Add `append` method to Config component
Status.md:- Renamed package setup functions to `setup_the_thing` & added `setup()` function to move setup out of the constructor.
Status.md:- Add namespaces to the view component
Status.md:- Modify package to use namespace when calling view component
Status.md:- Remove 'lia.packages'. This was a mistype & should have been 'lia.package' all along
Status.md:- Convert package list to use namespace instead of name
Status.md:- Separate SEO methods/api from `Resource` compo
Status.md:- namespaced apis. converted `api('lia.action', 'handler',...$args)` to `api('lia:action.handler', ...$args)`
Status.md:- namespaced configs with consistent naming like `lia:componame.configName`.
Status.md:- Ensure there is a `default()` call for every config
Status.md:- Review property docblocks in Liaison class. They don't match with the api namespaces refactor.
Status.md:- Continue Docblocking as marked below (in class/Objects/)
Status.md:- Don't forget the `Objects/ViewCallable.php`: Need to review this when I'm doing the `view` component
Status.md:- Write Markdown documentation AFTER docblocking is done
Status.md: - Write examples as tests & import
Status.md:- Docblocked everything except compos
Status.md:- Updated docblocks on Liaison methods to match api namespace refactor
Status.md:- Specify your package's `namespace` in `config.json`. This is separate from `name`.
Status.md:- List of available configs
Status.md:- Full api reference for `code/class` and `code/core`
Status.md:- Featured API Reference? For only listing featured methods & classes
Status.md:- TODO reference file (grouped by file name in a single markdown file)
Status.md:- All events & the paramaters they pass
Status.md:- Liaison.php
Status.md: - Mostly good
Status.md: - `api` methods (`addApi`, `addApiMethod`, etc...) are not well documented. Since I want to remove `$handler`, I'll probably wait on that.
Status.md: - Some things are a little under-documented, but the method-signature and the short function bodies... makes it not that big a deal
Status.md: - Not `@tag`ged very well
Status.md:- Compo.php
Status.md: - Well documented
Status.md: - @featured & @tag pretty well
Status.md:- Package.php
Status.md: - Pretty well documented
Status.md: - Not sure about my `@tag`s. There are `@tag setup` & `@featured`. I think there could be more organization there.
Status.md:- CompoTrait/
Status.md: - Scanner.php
Status.md: - Docs pretty good.
Status.md: - trait needs some rewrite (thus docs will, too)
Status.md: - Only the class has `@tag internals, component`... Idk.
Status.md:- Exception/
Status.md: - Base.php
Status.md: - Wrote @todos.
Status.md: - Nothing really needs documented here. You just create an exception
Status.md: - \*.php
Status.md: - I plan to delete the other exceptions & improve BaseException with extensibility. So... No. Not documenting these
Status.md:- LiaisonInterface/
Status.md: - LifeCycler.php
Status.md: - @deprecated & @todo delete, because its not in use far as I could grep
Status.md: - PackageLifeCycle.php
Status.md: - Documented nicely. But documentation is nearly identical to documentaiton on `\Lia\Compo` for these methods. Perhaps I can remove identical docs from compo.
Status.md:- Objects/
Status.md: - IView.php
Status.md: - Documented, some @todos
Status.md: - View.php
Status.md: - Well Documented, some @todos
Status.md: - Request.php
Status.md: - Well Documented, very basic class
Status.md: - Response.php
Status.md: - Reasonably well documented. Some @todos
Status.md: - Route.php
Status.md: - Adequately documented... bad class.
Status.md: - No tags... I might want tags
Status.md: - ViewCallable.php
Status.md: - TODO <- There is no structure. It's all setup by the View component, I think. So its not well setup for documenting
Status.md:- Utility/
Status.md: - ClassFinder.php
Status.md: - Barely documented, because it comes from my Utility repo. So its fine.
Status.md: - DotNotation.php
Status.md: - documented well enough. No tags
Status.md: - FancyClosure.php
Status.md: - documented well enough. No tags
Status.md: - Files.php
Status.md: - Documented well enough. No tags
Status.md: - StaticFile.php
Status.md: - Documented well enough. No tags
Status.md:- ../core/
Status.md: - Has not been started
Status.md:- Phad templates & Lia views will both be accessible through `$lia->view()`.
Status.md:- Lia\Compo\View will
Status.md: - implement a view getter
Status.md: - have an add_view_dir($dir, $namespace, $args) function that adds a dir for PSR-4 style view-name loading
Status.md: - have an add_view_callable($callable, $fullyQualifiedViewName, $args) function to explicitly add a callable as a view
Status.md: - have an add_view($dir, $fullyQualifiedViewName, $args) fucntion to explicitly add a single view
Status.md: - this is already implemented
Status.md:- Phad\Compo will
Status.md: - implement a view getter
Status.md: - have an add_view_dir($dir, $namespace, $args) function for psr-4 style view loading
Status.md:- Some Future View Component will
Status.md: - implement a view getter
Status.md: - have an add_whatever function to add whatever.... to be later retrieved by the view getter method