mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 14:49:56 +09:00
Move all composer files inside the common directory
- 2022년 3월 개발팀 결정사항 적용 - 모듈 등 서드파티 자료 개발시 composer를 사용하면 상위 경로에 있는 코어의 composer.json을 수정하고, 코어의 vendor 디렉토리를 건드리는 것이 기본값임 - 이를 방지하기 위해 코어의 composer.json과 vendor를 common 디렉토리 안으로 이동하여, 모듈 경로에서 상위 폴더로 인식하지 않도록 함
This commit is contained in:
parent
7b912d21fc
commit
5fff6b6eab
1478 changed files with 2 additions and 2 deletions
95
common/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Context.php
vendored
Normal file
95
common/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Context.php
vendored
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Registry object that contains information about the current context.
|
||||
* @warning Is a bit buggy when variables are set to null: it thinks
|
||||
* they don't exist! So use false instead, please.
|
||||
* @note Since the variables Context deals with may not be objects,
|
||||
* references are very important here! Do not remove!
|
||||
*/
|
||||
class HTMLPurifier_Context
|
||||
{
|
||||
|
||||
/**
|
||||
* Private array that stores the references.
|
||||
* @type array
|
||||
*/
|
||||
private $_storage = array();
|
||||
|
||||
/**
|
||||
* Registers a variable into the context.
|
||||
* @param string $name String name
|
||||
* @param mixed $ref Reference to variable to be registered
|
||||
*/
|
||||
public function register($name, &$ref)
|
||||
{
|
||||
if (array_key_exists($name, $this->_storage)) {
|
||||
trigger_error(
|
||||
"Name $name produces collision, cannot re-register",
|
||||
E_USER_ERROR
|
||||
);
|
||||
return;
|
||||
}
|
||||
$this->_storage[$name] =& $ref;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a variable reference from the context.
|
||||
* @param string $name String name
|
||||
* @param bool $ignore_error Boolean whether or not to ignore error
|
||||
* @return mixed
|
||||
*/
|
||||
public function &get($name, $ignore_error = false)
|
||||
{
|
||||
if (!array_key_exists($name, $this->_storage)) {
|
||||
if (!$ignore_error) {
|
||||
trigger_error(
|
||||
"Attempted to retrieve non-existent variable $name",
|
||||
E_USER_ERROR
|
||||
);
|
||||
}
|
||||
$var = null; // so we can return by reference
|
||||
return $var;
|
||||
}
|
||||
return $this->_storage[$name];
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys a variable in the context.
|
||||
* @param string $name String name
|
||||
*/
|
||||
public function destroy($name)
|
||||
{
|
||||
if (!array_key_exists($name, $this->_storage)) {
|
||||
trigger_error(
|
||||
"Attempted to destroy non-existent variable $name",
|
||||
E_USER_ERROR
|
||||
);
|
||||
return;
|
||||
}
|
||||
unset($this->_storage[$name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether or not the variable exists.
|
||||
* @param string $name String name
|
||||
* @return bool
|
||||
*/
|
||||
public function exists($name)
|
||||
{
|
||||
return array_key_exists($name, $this->_storage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a series of variables from an associative array
|
||||
* @param array $context_array Assoc array of variables to load
|
||||
*/
|
||||
public function loadArray($context_array)
|
||||
{
|
||||
foreach ($context_array as $key => $discard) {
|
||||
$this->register($key, $context_array[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
Loading…
Add table
Add a link
Reference in a new issue