+++ /dev/null
-<?php
-/*=====================================================================*\
-|| ###################################################################
-|| # ISSO
-|| # Copyright (c)2005-2008 Blue Static
-|| #
-|| # This program is free software; you can redistribute it and/or modify
-|| # it under the terms of the GNU General Public License as published by
-|| # the Free Software Foundation; version 2 of the License.
-|| #
-|| # This program is distributed in the hope that it will be useful, but
-|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-|| # more details.
-|| #
-|| # You should have received a copy of the GNU General Public License along
-|| # with this program; if not, write to the Free Software Foundation, Inc.,
-|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-|| ###################################################################
-\*=====================================================================*/
-
-// timezone list
-// print_r(DateTimeZone::listIdentifiers());
-
-// try datetimezone
-$tz = new DateTimeZone('US/Pacific');
-// $tz = new DateTimeZone('US/Eastern');
-
-// timestamps
-// 1184454242 ~= Sat Jul 14 16:04:07 PDT 2007
-$date = new DateTime('@1184454242');
-$date->setTimeZone($tz);
-echo $date->format('r');
-
-?>
\ No newline at end of file
+++ /dev/null
-<?php
-/*=====================================================================*\
-|| ###################################################################
-|| # ISSO
-|| # Copyright (c)2005-2008 Blue Static
-|| #
-|| # This program is free software; you can redistribute it and/or modify
-|| # it under the terms of the GNU General Public License as published by
-|| # the Free Software Foundation; version 2 of the License.
-|| #
-|| # This program is distributed in the hope that it will be useful, but
-|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-|| # more details.
-|| #
-|| # You should have received a copy of the GNU General Public License along
-|| # with this program; if not, write to the Free Software Foundation, Inc.,
-|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-|| ###################################################################
-\*=====================================================================*/
-
-class MyPDO extends PDO
-{
- public $history = array();
-
- public function __construct()
- {
- $args = func_get_args();
- call_user_func_array(array($this, 'parent::__construct'), $args);
- $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('MyStatement', array($this)));
- }
-
- public function exec()
- {
- $args = func_get_args();
- echo 'hi';
- call_user_func_array(array($this, 'parent::exec'), $args);
- $this->history[] = func_get_args();
- }
-
- public function query()
- {
- echo 'moo';
- $args = func_get_args();
- call_user_func_array(array($this, 'parent::query'), $args);
- $this->history[] = $args;
- }
-}
-
-class MyStatement extends PDOStatement
-{
- private $pdo;
-
- private function __construct($pdo)
- {
- $this->pdo = $pdo;
- }
-
- public function execute()
- {
- $args = func_get_args();
- call_user_func_array(array($this, 'parent::execute'), $args);
- $this->pdo->history[] = $this->queryString;
- }
-
- public function query()
- {
- $args = func_get_args();
- call_user_func_array(array($this, 'parent::query'), $args);
- $this->pdo->history[] = $this->queryString;
- }
-}
-
-$db = new MyPDO('mysql:host=localhost;dbname=test', 'mysql', 'elssur');
-
-$smt = $db->prepare("SELECT * FROM user WHERE userid = :hi");
-$smt->bindValue('hi', null);
-// echo $smt;
-// $smt->execute(array(1));
-
-$smt->execute();
-
-print_r($smt->fetch());
-
-print_r($db->history);
-
-?>
\ No newline at end of file
+++ /dev/null
-<?php
-/*=====================================================================*\
-|| ###################################################################
-|| # Blue Static ISSO Framework
-|| # Copyright (c)2005-2008 Blue Static
-|| #
-|| # This program is free software; you can redistribute it and/or modify
-|| # it under the terms of the GNU General Public License as published by
-|| # the Free Software Foundation; version 2 of the License.
-|| #
-|| # This program is distributed in the hope that it will be useful, but
-|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-|| # more details.
-|| #
-|| # You should have received a copy of the GNU General Public License along
-|| # with this program; if not, write to the Free Software Foundation, Inc.,
-|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-|| ###################################################################
-\*=====================================================================*/
-
-header('Content-Type: text/html; charset=utf8');
-
-// simple document
-$data = file_get_contents('../docs/xmltest.xml');
-$xml = new SimpleXMLElement($data);
-print_r($xml);
-print_r($xml->download[1]->date->timestamp->attributes());
-
-// utf8 - no header tag
-$data = '<doc>
- <moo>הודעות של צור קשר לא מגיעות לשום מקום</moo>
-</doc>';
-$xml = new SimpleXmlElement($data);
-print_r($xml);
-
-// utf8
-$data = '<?xml version="1.0" encoding="utf-8" ?>
-<doc>
- <moo>הודעות של צור קשר לא מגיעות לשום מקום</moo>
-</doc>';
-$xml = new SimpleXmlElement($data);
-print_r($xml);
-
-?>
\ No newline at end of file
+++ /dev/null
-RESULTS OF TESTS:
-
-SVN $Id$
-================================
-
-1) BSXml can be removed in favor of using the SimpleXml extension
-
-2) PHP's new DateTime/DateTimeZone classes can be used to fully implement date functionality
-
-3) PDO could replace BSDd however there is no way to view a compiled query with all prepared
- variables replaced, which prevents us from doing stats on queries
-
-4) Exceptions are far more powerful than trigger_error() and should be used instead, alongside
- a global uncaught exception handler
\ No newline at end of file