Поправил названия классов

This commit is contained in:
origami11 2017-02-16 11:48:41 +03:00
parent c8958cbee0
commit 8a8e42d73d
21 changed files with 64 additions and 86 deletions

View file

@ -3,7 +3,7 @@
/** /**
* Фильтр действий * Фильтр действий
*/ */
class ActionAccess class Filter_ActionAccess
{ {
public $access = array(); public $access = array();

View file

@ -1,6 +1,6 @@
<?php <?php
class ActionLogger class Filter_ActionLogger
{ {
public $before = array (); public $before = array ();
public $file; public $file;

View file

@ -95,7 +95,7 @@ class TUpload extends TField
* Форма для ввода * Форма для ввода
* @package core * @package core
*/ */
class TForm class Form_Form
{ {
public $field = array (); public $field = array ();
public $action = ""; public $action = "";

View file

@ -4,7 +4,7 @@
* http://www.alternateinterior.com/2006/09/a-viewstate-for-php.html * http://www.alternateinterior.com/2006/09/a-viewstate-for-php.html
* Управление состоянием между страницами * Управление состоянием между страницами
*/ */
class ViewState // extends Collection class Form_ViewState // extends Collection
{ {
private $values = array(); private $values = array();

View file

@ -3,7 +3,7 @@
/** /**
* Генерация файлов Grpahviz dot * Генерация файлов Grpahviz dot
*/ */
class Dot class Formats_Dot
{ {
static function getHeader () static function getHeader ()
{ {
@ -48,5 +48,3 @@ class Dot
return implode("", $result); return implode("", $result);
} }
} }
?>

View file

@ -1,6 +1,6 @@
<?php <?php
class Point class Geometry_Point
{ {
public $left, $top; public $left, $top;
function __construct ($left = 0, $top = 0) function __construct ($left = 0, $top = 0)

View file

@ -1,8 +1,6 @@
<?php <?php
require_once "core/geometry/point.php"; class Geometry_Rectangle
class Rectangle
{ {
public $left, $top, $width, $height; public $left, $top, $width, $height;

View file

@ -1,7 +1,5 @@
<?php <?php
require_once 'core/primitive.php';
/** /**
* Использовать интерфейсы чтобы определить какие действия можно совершать с обьектом и таким образом * Использовать интерфейсы чтобы определить какие действия можно совершать с обьектом и таким образом
* Строить набор действий Action и отображений View для обьекта * Строить набор действий Action и отображений View для обьекта

View file

@ -25,9 +25,6 @@ class PathMapper
function findAll (Collection $request, $id = null) function findAll (Collection $request, $id = null)
{ {
require_once "core/settings.php";
require_once "core/path.php";
$this->reference = $id; $this->reference = $id;
$base = $this->basePath (); $base = $this->basePath ();
@ -75,4 +72,3 @@ class PathMapper
} }
} }
?>

View file

@ -1,8 +1,5 @@
<?php <?php
require_once 'table.php';
require_once 'meta.php';
/** /**
* Класс для составления запроса * Класс для составления запроса
*/ */

View file

@ -1,9 +1,5 @@
<?php <?php
require_once 'core/search/htmlhelper.php';
require_once 'core/search/stemmer.php';
require_once 'core/path.php';
/** /**
* Индексирование файлов * Индексирование файлов
*/ */

View file

@ -1,7 +1,6 @@
<?php <?php
require_once 'core/search/lexer.php'; require_once __DIR__ '/../functions.php';
require_once 'core/functions.php';
/** /**
* Поиск в индексе * Поиск в индексе

View file

@ -1,9 +1,5 @@
<?php <?php
require_once 'core/search/search.php';
require_once 'core/search/htmlhelper.php';
require_once 'core/search/stemmer.php';
class Searcher { class Searcher {
/* protected */ public $index; /* protected */ public $index;
protected $text; protected $text;

View file

@ -1,6 +1,6 @@
<?php <?php
class Drawing class Tools_Drawing
{ {
const ALIGN_LEFT = "left"; const ALIGN_LEFT = "left";
const ALIGN_TOP = "top"; const ALIGN_TOP = "top";

View file

@ -1,6 +1,6 @@
<?php <?php
class Core_Tools_Image class Tools_Image
{ {
static function load($uri) static function load($uri)
{ {

View file

@ -1,37 +1,53 @@
<?php <?php
// from creole class Tools_String {
function strToArray($str) // from creole
{ static function strToArray($str)
$str = substr($str, 1, -1); // remove { } {
$res = array(); $str = substr($str, 1, -1); // remove { }
$res = array();
$subarr = array(); $subarr = array();
$in_subarr = 0; $in_subarr = 0;
$toks = explode(',', $str); $toks = explode(',', $str);
foreach($toks as $tok) { foreach($toks as $tok) {
if ($in_subarr > 0) { // already in sub-array? if ($in_subarr > 0) { // already in sub-array?
$subarr[$in_subarr][] = $tok; $subarr[$in_subarr][] = $tok;
if ('}' === substr($tok, -1, 1)) { // check to see if we just added last component if ('}' === substr($tok, -1, 1)) { // check to see if we just added last component
$res[] = $this->strToArray(implode(',', $subarr[$in_subarr])); $res[] = $this->strToArray(implode(',', $subarr[$in_subarr]));
$in_subarr--; $in_subarr--;
} }
} elseif ($tok{0} === '{') { // we're inside a new sub-array } elseif ($tok{0} === '{') { // we're inside a new sub-array
if ('}' !== substr($tok, -1, 1)) { if ('}' !== substr($tok, -1, 1)) {
$in_subarr++; $in_subarr++;
// if sub-array has more than one element // if sub-array has more than one element
$subarr[$in_subarr] = array(); $subarr[$in_subarr] = array();
$subarr[$in_subarr][] = $tok; $subarr[$in_subarr][] = $tok;
} else { } else {
$res[] = $this->strToArray($tok); $res[] = $this->strToArray($tok);
} }
} else { // not sub-array } else { // not sub-array
$val = trim($tok, '"'); // remove " (surrounding strings) $val = trim($tok, '"'); // remove " (surrounding strings)
// perform type castng here? // perform type castng here?
$res[] = $val; $res[] = $val;
} }
} }
return $res; return $res;
}
static function translit($st) {
$st = strtr($st,"абвгдеёзийклмнопрстуфхъыэ !№", "abvgdeeziyklmnoprstufh_ie__#");
$st = strtr($st,"АБВГДЕЁЗИЙКЛМНОПРСТУФХЪЫЭ", "ABVGDEEZIYKLMNOPRSTUFH_IE");
$st = strtr($st, array(
"ж"=>"zh", "ц"=>"ts", "ч"=>"ch", "ш"=>"sh",
"щ"=>"shch","ь"=>"", "ю"=>"yu", "я"=>"ya",
"Ж"=>"ZH", "Ц"=>"TS", "Ч"=>"CH", "Ш"=>"SH",
"Щ"=>"SHCH","Ь"=>"", "Ю"=>"YU", "Я"=>"YA",
"ї"=>"i", "Ї"=>"Yi", "є"=>"ie", "Є"=>"Ye"
));
return $st;
}
} }

View file

@ -1,11 +1,9 @@
<?php <?php
require_once 'core/tools/drawing.php';
/** /**
* Формат для композиции изображений * Формат для композиции изображений
*/ */
class TemplateImage class Tools_TemplateImage
{ {
static $listfiles = array('jpg' => 'jpeg', 'gif' => 'gif', 'png' => 'png', 'bmp' => 'wbmp'); static $listfiles = array('jpg' => 'jpeg', 'gif' => 'gif', 'png' => 'png', 'bmp' => 'wbmp');
static $listfonts = array( static $listfonts = array(

View file

@ -1,14 +0,0 @@
<?php
function translit($st) {
$st = strtr($st,"абвгдеёзийклмнопрстуфхъыэ !№", "abvgdeeziyklmnoprstufh_ie__#");
$st = strtr($st,"АБВГДЕЁЗИЙКЛМНОПРСТУФХЪЫЭ", "ABVGDEEZIYKLMNOPRSTUFH_IE");
$st = strtr($st, array(
"ж"=>"zh", "ц"=>"ts", "ч"=>"ch", "ш"=>"sh",
"щ"=>"shch","ь"=>"", "ю"=>"yu", "я"=>"ya",
"Ж"=>"ZH", "Ц"=>"TS", "Ч"=>"CH", "Ш"=>"SH",
"Щ"=>"SHCH","Ь"=>"", "Ю"=>"YU", "Я"=>"YA",
"ї"=>"i", "Ї"=>"Yi", "є"=>"ie", "Є"=>"Ye"
));
return $st;
}

View file

@ -86,7 +86,7 @@ function _inside($a, $x, $y) {
return " " . $a . " > " . $x . " AND " . $a . " < " . $y; return " " . $a . " > " . $x . " AND " . $a . " < " . $y;
} }
class CDBTree class Tree_DBTree
{ {
var $db; // CDatabase class to plug to var $db; // CDatabase class to plug to
var $table; // Table with Nested Sets implemented var $table; // Table with Nested Sets implemented

View file

@ -15,7 +15,7 @@
// Note: For best viewing of the code Tab size 4 is recommended // Note: For best viewing of the code Tab size 4 is recommended
//**************************************************************************** //****************************************************************************
class CDatabase class Tree_Database
{ {
var $link; var $link;
var $db; var $db;

View file

@ -9,7 +9,7 @@
* $sort = new NestedSetSort(); * $sort = new NestedSetSort();
* $data = $sort->sortBy($data, 'name'); * $data = $sort->sortBy($data, 'name');
*/ */
class NestedSetSort { class Tree_Sort {
private $data = array(); private $data = array();
private $result = array(); private $result = array();
private $sortBy = ''; private $sortBy = '';