Merge branch 'autoload' of http://gitlab.edu.yar.ru/phedor/PHP_Library into autoload

This commit is contained in:
origami11 2017-02-17 14:56:31 +03:00
commit 1b5852cc43
18 changed files with 61 additions and 81 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

@ -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,7 +1,8 @@
<?php <?php
class Tools_String {
// from creole // from creole
function strToArray($str) static function strToArray($str)
{ {
$str = substr($str, 1, -1); // remove { } $str = substr($str, 1, -1); // remove { }
$res = array(); $res = array();
@ -35,3 +36,18 @@ function strToArray($str)
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

@ -3,7 +3,7 @@
/** /**
* Формат для композиции изображений * Формат для композиции изображений
*/ */
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 = '';