Commits

Anonymous committed d22199f

Bersih2 sisa doctrine

Comments (0)

Files changed (10)

 system
 nbproject
 wiki
+*.bak

application/cli-config.php

-<?php
-use Doctrine\Common\ClassLoader,
-    Doctrine\ORM\Configuration,
-    Doctrine\ORM\EntityManager,
-    Doctrine\Common\Cache\ArrayCache,
-    Doctrine\DBAL\Logging\EchoSqlLogger;
- 
-define('BASEPATH', __DIR__ . '/../system/');
- 
-require_once __DIR__ . '/config/database.php';
-require_once __DIR__ . '/libraries/Doctrine/Common/ClassLoader.php';
- 
-$doctrineClassLoader = new ClassLoader('Doctrine',  __DIR__.'libraries');
-$doctrineClassLoader->register();
-$entitiesClassLoader = new ClassLoader('models', __DIR__);
-$entitiesClassLoader->register();
-$proxiesClassLoader = new ClassLoader('Proxies', __DIR__.'models/proxies');
-$proxiesClassLoader->register();
-$config = new \Doctrine\ORM\Configuration();
-$config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache);
-$config->setProxyDir(__DIR__ . '/Proxies');
-$config->setProxyNamespace('Proxies');
- 
-$cache = new ArrayCache;
-// Set up driver
-$Doctrine_AnnotationReader = new \Doctrine\Common\Annotations\AnnotationReader($cache);
-$Doctrine_AnnotationReader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\');
-$driver = new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($Doctrine_AnnotationReader, realpath('../models'));
-$config->setMetadataDriverImpl($driver);
- 
-// Database connection information
-$connectionOptions = array(
-    'driver' => 'pdo_mysql',
-    'user' =>     $db['default']['username'],
-    'password' => $db['default']['password'],
-    'host' =>     $db['default']['hostname'],
-    'dbname' =>   $db['default']['database']
-);
- 
-$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config);
- 
-$helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
-    'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
-    'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
-));

application/config/config.php

 |	http://example.com/
 |
 */
-$config['base_url']	= "http://tanur.local/";
+$config['base_url']	= "http://tanur2.local/";
 
 /*
 |--------------------------------------------------------------------------
 | By default CodeIgniter uses search-engine friendly segment based URLs:
 | example.com/who/what/where/
 |
+| By default CodeIgniter enables access to the $_GET array. If for some
+| reason you would like to disable it, set 'allow_get_array' to FALSE.
+|
 | You can optionally enable standard query string based URLs:
 | example.com?who=me&what=something&where=here
 |
 |--------------------------------------------------------------------------
 |
 | Leave this BLANK unless you would like to set something other than the default
-| system/logs/ folder.  Use a full server path with trailing slash.
+| application/logs/ folder. Use a full server path with trailing slash.
 |
 */
 $config['log_path'] = '';
 |--------------------------------------------------------------------------
 |
 | Leave this BLANK unless you would like to set something other than the default
-| system/cache/ folder.  Use a full server path with trailing slash.
+| system/cache/ folder. Use a full server path with trailing slash.
 |
 */
 $config['cache_path'] = '';
 |--------------------------------------------------------------------------
 |
 | If you use the Encryption class or the Session class you
-| MUST set an encryption key.  See the user guide for info.
+| MUST set an encryption key. See the user guide for info.
 |
 */
-$config['encryption_key'] = 'ci_c#@Ge!-~';
+$config['encryption_key'] = '';
 
 /*
 |--------------------------------------------------------------------------
 |
 | 'cookie_prefix' = Set a prefix if you need to avoid collisions
 | 'cookie_domain' = Set to .your-domain.com for site-wide cookies
-| 'cookie_path'   =  Typically will be a forward slash
+| 'cookie_path'  = Typically will be a forward slash
+| 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists.
 |
 */
 $config['cookie_prefix']	= "";

application/config/constants.php

-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
 /*
 |--------------------------------------------------------------------------
 |--------------------------------------------------------------------------
 |
 | These prefs are used when checking and setting modes when working
-| with the file system.  The defaults are fine on servers with proper
+| with the file system. The defaults are fine on servers with proper
 | security, but you may wish (or even need) to change the values in
 | certain environments (Apache running a separate process for each
-| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
+| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
 | always be used to set the mode correctly.
 |
 */

application/config/foreign_chars.php

-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /*
 | -------------------------------------------------------------------
 | Foreign Characters
 | conversion used by the Text helper
 |
 */
-$foreign_characters = array('223'	=>	"ss", // ß
-							'224'	=>	"a",
-							'225'	=>	"a",
-							'226'	=>	"a",
-							'229'	=>	"a",
-							'227'	=>	"ae",
-							'230'	=>	"ae",
-							'228'	=>	"ae",
-							'231'	=>	"c",
-							'232'	=>	"e",  // è
-							'233'	=>	"e",  // é
-							'234'	=>	"e",  // ê
-							'235'	=>	"e",  // ë
-							'236'	=>	"i",
-							'237'	=>	"i",
-							'238'	=>	"i",
-							'239'	=>	"i",
-							'241'	=>	"n",
-							'242'	=>	"o",
-							'243'	=>	"o",
-							'244'	=>	"o",
-							'245'	=>	"o",
-							'246'	=>	"oe", // ö
-							'249'	=>	"u",
-							'250'	=>	"u",
-							'251'	=>	"u",
-							'252'	=>	"ue", // ü
-							'255'	=>	"y",
-							'257'	=>	"aa",
-							'269'	=>	"ch",
-							'275'	=>	"ee",
-							'291'	=>	"gj",
-							'299'	=>	"ii",
-							'311'	=>	"kj",
-							'316'	=>	"lj",
-							'326'	=>	"nj",
-							'353'	=>	"sh",
-							'363'	=>	"uu",
-							'382'	=>	"zh",
-							'256'	=>	"aa",
-							'268'	=>	"ch",
-							'274'	=>	"ee",
-							'290'	=>	"gj",
-							'298'	=>	"ii",
-							'310'	=>	"kj",
-							'315'	=>	"lj",
-							'325'	=>	"nj",
-							'352'	=>	"sh",
-							'362'	=>	"uu",
-							'381'	=>	"zh",
-							);
-
+$foreign_characters = array(
+	'/ä|æ|ǽ/' => 'ae',
+	'/ö|œ/' => 'oe',
+	'/ü/' => 'ue',
+	'/Ä/' => 'Ae',
+	'/Ü/' => 'Ue',
+	'/Ö/' => 'Oe',
+	'/À|Á|Â|Ã|Ä|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ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u',
+	'/Ý|Ÿ|Ŷ/' => 'Y',
+	'/ý|ÿ|ŷ/' => 'y',
+	'/Ŵ/' => 'W',
+	'/ŵ/' => 'w',
+	'/Ź|Ż|Ž/' => 'Z',
+	'/ź|ż|ž/' => 'z',
+	'/Æ|Ǽ/' => 'AE',
+	'/ß/'=> 'ss',
+	'/IJ/' => 'IJ',
+	'/ij/' => 'ij',
+	'/Œ/' => 'OE',
+	'/ƒ/' => 'f'
+);
 
 /* End of file foreign_chars.php */
 /* Location: ./application/config/foreign_chars.php */

application/config/routes.php

 | RESERVED ROUTES
 | -------------------------------------------------------------------------
 |
-| There is one reserved routes:
+| There area two reserved routes:
 |
 |	$route['default_controller'] = 'welcome';
 |
 | This route indicates which controller class should be loaded if the
 | URI contains no data. In the above example, the "welcome" class
 | would be loaded.
+|
+|	$route['404_override'] = 'errors/page_missing';
+|
+| This route will tell the Router what URI segments to use if those provided
+| in the URL cannot be matched to a valid route.
+|
 */
 
 

application/config/user_agents.php

 					'nokia'				=> "Nokia",
 					'palm'				=> "Palm",
 					'iphone'			=> "Apple iPhone",
+					'ipad'				=> "iPad",
 					'ipod'				=> "Apple iPod Touch",
 					'sony'				=> "Sony Ericsson",
 					'ericsson'			=> "Sony Ericsson",

application/doctrine.php

-<?php
-chdir(dirname(__FILE__) . '/libraries');
- 
-require_once 'Doctrine/Common/ClassLoader.php';
-// require_once '/lib/vendor/lib/Doctrine/Core.php'; 
- 
-$classLoader = new \Doctrine\Common\ClassLoader('Doctrine');
-$classLoader->register();
- 
-$classLoader = new \Doctrine\Common\ClassLoader('Symfony', 'Doctrine');
-$classLoader->register();
- 
-$configFile = '../cli-config.php';
-$helperSet = null;
-if (file_exists($configFile)) {
-    if ( ! is_readable($configFile)) {
-        trigger_error(
-            'Configuration file [' . $configFile . '] does not have read permission.', E_ERROR
-        );
-    }
- 
-    require $configFile;
- 
-    foreach ($GLOBALS as $helperSetCandidate) {
-        if ($helperSetCandidate instanceof \Symfony\Component\Console\Helper\HelperSet) {
-            $helperSet = $helperSetCandidate;
-            break;
-        }
-    }
-}
- 
-$helperSet = ($helperSet) ?: new \Symfony\Component\Console\Helper\HelperSet();
- 
-$cli = new \Symfony\Component\Console\Application('Doctrine Command Line Interface', Doctrine\ORM\Version::VERSION);
-$cli->setCatchExceptions(true);
-$cli->setHelperSet($helperSet);
-$cli->addCommands(array(
-    // DBAL Commands
-    new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(),
-    new \Doctrine\DBAL\Tools\Console\Command\ImportCommand(),
- 
-    // ORM Commands
-    new \Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\RunDqlCommand(),
-    new \Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand(),
- 
-));
-$cli->run();

application/models/Option.php

-<?php
-
-namespace models;
-
-/**
-* @Entity
-* @Table(name="options")
-*/
-class Option
-{
-	/**
-	* @Id
-	* @Column(type="ingteger", nullable="false")
-	* @GeneratedValue(strategy="AUTO")
-	*/
-	private $id;
-	
-	/**
-	* @Column(type="string", length="255", nullable="false")
-	*/
-	private $name;
-	
-	/**
-	* @Column(type="string", length="255", nullable="false")
-	*/
-	private $value;
-	
-	/**
-	* @Column(type="string", length="255", nullable="true")
-	*/
-	private $modul;
-	
-	/**
-	* @Column(type="boolean", nullable="false")
-	*/
-	private $autoload;
-}

application/models/User.php

-<?php
- 
-namespace models;
- 
-/**
- * @Entity
- * @Table(name="users")
- */
-class User
-{
-	/**
-	 * @Id
-	 * @Column(type="integer", nullable=false)
-	 * @GeneratedValue(strategy="AUTO")
-	 */
-	private $id;
-	 
-	/**
-	 * @Column(type="string", length=255, unique=true, nullable=false)
-	 */
-	private $username;
-	 
-	/**
-	 * @Column(type="string", length=255, unique=false, nullable=false)
-	 */
-	private $password;
-
-	/**
-	 * @Column(type="string", length=255, unique=true, nullable=false)
-	 */
-	private $email;
-	
-	/**
-	 * @OneToOne(targetEntity="User")
-	 * @JoinColumn(name="referer_id", referencedColumnName="id")
-	 * @Column(type="integer", nullable=true)
-	 */
-	private $referer_id;
-	
-	/**
-	 * @Column(type="string", length=255, unique=true, nullable=false)
-	 */
-	private $facebook_id;	
-	 
-	public function getId() { return $this->id; }
-
-	public function setUsername($username) { $this->username = $username; }
-	public function getUsername() { return $this->username; }
-
-	// Setters and Getters
-	public function setPassword($password) { $this->password = $password; }
-	public function getPassword() {  return $this->password; }
-
-	public function setEmail($email) { $this->email = $email; }
-	public function getEmail() {  return $this->email; }	
-	
-	public function setFacebookID($facebook_id) { $this->facebook_id = $facebook_id; }
-	public function getFacebookID() {  return $this->facebook_id; }	
-	
-	public function setRefererID($referer_id) { $this->referer_id = $referer_id; }
-	public function getRefererID() {  return $this->referer_id; }		
-	
-	// Magic Methods 
-	public function __toString()
-	{
-		$retVal = "Username: " . $this->username . " ";
-		$retVal .= "Password: " . $this->password . " ";
-		$retVal .= "Email: " . $this->email . " ";
-		$retVal .= "Facebook ID: " . $this->facebook_id . " ";
-		$retVal .= "Referer ID: " . $this->referer_id;
-		return $retVal;
-	}
-}