Skip to content

Instantly share code, notes, and snippets.

@nerdsrescueme
nerdsrescueme / cache.php
Created October 20, 2011 20:05
Atom Cache
<?php
/**
* Core Atom library namespace. This namespace contains all of the fundamental
* components of Atom, plus additional utilities that are provided by default.
* Some of these default components have sub namespaces if they provide child
* objects.
*
* @pacakge Atom
* @subpackage Library

Atom

Atom is a PHP 5.3 component-based library that aims to extend PHP, not abstract it. It focuses on security, scalability, optimization and simplicity, while solving problems intrinsic to any application. The Atom code-base is highly organized and continuously optimized to ensure it can deliver powerful results with as small a footprint as possible.

Atom's design focuses on scalability challenges by extending PHP's power as opposed to abstracting it away. It was built on the assumption that PHP provides a powerful foundation for development, so Atom capitalizes on that power where it makes the most sense.

Atom is not for your everyday, "do it for me" developer. It's built for the "get your hands dirty" developers out there. The kind of coders who want to know why code works, not simply that it works. A lot of thought work is put into each line of code inside of Atom. Each class will require an understanding of design patterns, the way PHP works, and even how your server interacts wit

@nerdsrescueme
nerdsrescueme / uninstantiable.php
Created October 19, 2011 20:17
Uninstantiable
<?php
/**
* Design namespace. This namespace is meant for abstract concepts and in most
* cases simply just interfaces that in someway structures the general design
* used in the core components.
*
* @package Atom
* @subpackage Library
*/
@nerdsrescueme
nerdsrescueme / dot.php
Created October 19, 2011 13:33
Dot Notation Interpreter
<?php
/**
* Design namespace. This namespace is meant for abstract concepts and in most
* cases simply just interfaces that in someway structures the general design
* used in the core components.
*
* @package Atom
* @subpackage Library
*/
<?php
namespace Atom;
class Error {
private static $instance;
public static function instance(array $config = array())
{
<?php
namespace Atom;
class Locale {
private static $locale;
public static function get()
{
<?php
/**
* Design namespace. This namespace is meant for abstract concepts and in most
* cases simply just interfaces that in someway structures the general design
* used in the core components.
*
* @package Atom
* @subpackage Library
*/
<?php
namespace Atom\Parser;
class Html {
private $separator = '-{}-';
private $single_tags = 'meta|img|hr|br|link|!--|!DOCTYPE|input';
<?php
/**
* Core Atom library namespace. This namespace contains all of the fundamental
* components of the Atom framework, plus additional utilities that are provided
* by default. Some of these default components have sub namespaces if they
* provide child objects.
*
* @package Atom
* @subpackage Library
<?php
use Atom\Arr;
class Model {
protected static $_locked = true; // Is the database table locked from changes?
protected $_data = array();