This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class AppController extends Controller { | |
var $components = array('Auth', 'Session'); | |
var $helpers = array('Html', 'Javascript', 'Form', 'Session'); | |
function beforeFilter() { | |
parent::beforeFilter(); | |
$this->Auth->loginRedirect = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// CORE/app/models/datasources/json_source.php | |
/** | |
* JSON Source module for CakePHP. | |
* | |
* @package cake | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="RandomStringGenerator.cs" company=""> | |
// Nero Sule | |
// </copyright> | |
// <summary> | |
// Class for random string generation. Does not include ambiguous characters like | |
// I, 1 and l. | |
// Every four characters include one lower case character, one upper case character, | |
// one number and a special symbol in a random order. String will start with | |
// an alphanumeric character. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static object Limit(object o, int level) | |
{ | |
if (level <= 0) | |
return null; | |
PropertyInfo[] properties = o.GetType().GetProperties(); | |
foreach (var property in properties) | |
{ | |
if (property.PropertyType.IsClass && property.CanWrite && property.PropertyType is IEnumerable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="Security.cs" company=""> | |
// | |
// </copyright> | |
// <summary> | |
// Class to manage security functions, such as Base64 encode/decode, SHA encryption, etc. | |
// Requires the Random String Generator class. | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="AllowAnonymousAttribute.cs" company=""> | |
// Nero Sule | |
// </copyright> | |
// <summary> | |
// Extra attribute to allow making all methods apart from those tagged "AllowAnonymous" to be requiring authorization | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- | |
namespace Web.Filters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="HtmlHelpers.cs" company=""> | |
// Nero Sule | |
// </copyright> | |
// <summary> | |
// HTML Helpers | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- | |
namespace Web.HtmlHelpers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="MultiViewController.cs" company=""> | |
// Nero Sule | |
// </copyright> | |
// <summary> | |
// Defines the MultiViewController type. | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- | |
namespace Web.Infrastructure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="NinjectDependencyResolver.cs" company=""> | |
// Nero Sule | |
// </copyright> | |
// <summary> | |
// Dependency Injection | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- | |
namespace Web.Infrastructure |
OlderNewer