uawdijnntqw1x1x1
IP : 18.218.195.15
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
kirov.axolotls.ru
/
bitrix
/
modules
/
pull
/
..
/
perfmon
/
lib
/
sql
/
base_object.php
/
/
<?php namespace Bitrix\Perfmon\Sql; /** * Class BaseObject * Base class for all schema objects such as tables, columns, indexes, etc. * @package Bitrix\Perfmon\Sql */ abstract class BaseObject { /** @var BaseObject|null */ public $parent = null; public $name = ''; public $body = ''; protected $ciName = ''; /** * @param string $name Name of the table. */ function __construct($name = '') { $this->name = (string)$name; $this->ciName = $this->getCompareName($this->name); } /** * Sets source code for object. * * @param string $body The body. * * @return BaseObject */ public function setBody($body) { $this->body = trim($body); return $this; } /** * Sets parent for object. * <p> * For example Table for Column. * * @param BaseObject $parent Parent object. * * @return BaseObject */ public function setParent(BaseObject $parent = null) { $this->parent = $parent; return $this; } /** * Returns "unquoted" name of the object. * * @param array|string $name Name or array of names to unquote. * * @return array|string */ final public function getUnquotedName($name = null) { if ($name === null && $this->name) { return $this->getUnquotedName($this->name); } elseif (is_array($name)) { foreach ($name as $key => $value) { $name[$key] = $this->getUnquotedName($value); } } elseif ($name[0] == '`') $name = trim($name, '`'); elseif ($name[0] == '"') $name = trim($name, '"'); elseif ($name[0] == '[') $name = trim($name, '[]'); return $name; } /** * Returns "lowercased" name of the object. * <p> * If name is not quoted then it made lowercase. * * @return string */ final public function getLowercasedName() { if ($this->name[0] == '`') return $this->name; elseif ($this->name[0] == '"') return $this->name; elseif ($this->name[0] == '[') return $this->name; else return mb_strtolower($this->name); } /** * Returns "normalized" name of the table. * <p> * If name is not quoted then it made uppercase. * * @param string $name Table name. * @return string */ final public static function getCompareName($name) { if ($name[0] == '`') return $name; elseif ($name[0] == '"') return $name; elseif ($name[0] == '[') return $name; else return mb_strtoupper($name); } /** * Compares name of the table with given. * <p> * If name has no quotes when comparison is case insensitive. * * @param string $name Table name to compare. * @return int * @see strcmp */ final public function compareName($name) { return strcmp($this->ciName, $this->getCompareName($name)); } /** * Return DDL or commentary for object creation. * * @param string $dbType Database type. * * @return array|string */ public function getCreateDdl($dbType = '') { return "// ".get_class($this).":getCreateDdl not implemented"; } /** * Return DDL or commentary for object destruction. * * @param string $dbType Database type. * * @return array|string */ public function getDropDdl($dbType = '') { return "// ".get_class($this).":getDropDdl not implemented"; } /** * Return DDL or commentary for object modification. * * @param BaseObject $target Target object. * @param string $dbType Database type. * * @return array|string */ public function getModifyDdl(BaseObject $target, $dbType = '') { return "// ".get_class($this).":getModifyDdl not implemented"; } }
/var/www/axolotl/data/www/kirov.axolotls.ru/bitrix/modules/pull/../perfmon/lib/sql/base_object.php