| Acme
| | Foobar
| | | Controller
| | | | FoobarController
| | | |
| | | Form
| | | | FoobarConfigForm.php
| | | | FoobarForm.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT a.id, a.title, a.alias, a.introtext, a.checked_out, a.checked_out_time, a.catid, a.created, a.created_by, a.created_by_alias, | |
CASE WHEN a.modified = '0000-00-00 00:00:00' THEN a.created ELSE a.modified END AS modified, a.modified_by, uam.name AS modified_by_name, | |
CASE WHEN a.publish_up = '0000-00-00 00:00:00' THEN a.created ELSE a.publish_up END AS publish_up,a.publish_down, a.images, a.urls, a.attribs, a.metadata, a.metakey, a.metadesc, a.access, a.hits, a.xreference, a.featured, LENGTH(a.fulltext) AS readmore, | |
CASE WHEN badcats.id IS NOT NULL THEN 0 ELSE a.state END AS state,c.title AS category_title, c.path AS category_route, c.access AS category_access, c.alias AS category_alias, | |
CASE WHEN a.created_by_alias > ' ' THEN a.created_by_alias ELSE ua.name END AS author,ua.email AS author_email,contact.id AS contactid,parent.title AS parent_title, parent.id AS parent_id, parent.path AS parent_route, parent.alias AS parent_alias,ROUND(v.rating_sum / v.rating_count, 0) AS rating |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function onBeforeCompileHead() | |
{ | |
$head = JFactory::getDocument()->getHeadData(); | |
$styleSheets = $head['styleSheets']; | |
$newStyleSheets = array(); | |
foreach ($styleSheets as $key => $value) | |
{ |
The Molajo Locator is a Resource Locator and Class Loader utilizing URI Namespaces.
A class loader
and resource locator
share a significant amount of code. This shared code includes building namespace and resource maps and searching those structures. Only a small portion of the code is unique. For each type of processing expected by the application (i.e., return a path, read a file, save a Url, etc.), 'handlers' are created and contain minimal code. A ClassLoader handler, for example, simply includes the path and returns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Problem 1: Problem only of perception or a Programmer Error. | |
// | |
// PSR-X allows the appearance of multiple FQNS to be assigned to a single class file. | |
// People might be confused and incorrectly assume the following is true. | |
// | |
// /path/to/packages/foo-bar/ | |
// src/ | |
// Baz.php # Foo\Bar\Baz | |
// Qux/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Level 1 | |
class Container implements ContainerInterface | |
{ | |
public function getService($service, $options = array()) | |
{ | |
// returns class instance if it has been so configured and is available |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get the current value (or default) of the specified key or all User Data for null key | |
* | |
* @param null|string $key | |
* @param null|mixed $default | |
* | |
* @return mixed | |
* @since 1.0 | |
* @throws \Molajo\User\Exception\DataException |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Generate a token and email a temporary link to change password and sends to user | |
* | |
* @param string $session_id | |
* @param string $username | |
* | |
* @return $this|void | |
* @since 1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ConfigurationInjector extends CustomInjector implements InjectorInterface | |
{ | |
/** | |
* Constructor | |
* | |
* @param array $option | |
* | |
* @since 1.0 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Standard Dependency Injector | |
* | |
* @package Molajo | |
* @license http://www.opensource.org/licenses/mit-license.html MIT License | |
* @copyright 2013 Amy Stephen. All rights reserved. | |
*/ | |
namespace Molajo\IoC\Handler; |