public function getRequest() { if ($this->request) { return $this->request; } else { if ($this->parent) { return $this->parent->getRequest(); } else { return Pixifier::getInstance()->getPixie()->http_request(); } } }
/** * Constructs Pixie instance. */ public function __construct() { $this->instance_classes['debug'] = '\\App\\Debug'; $this->instance_classes['request'] = '\\App\\Core\\Request'; $this->instance_classes['response'] = '\\App\\Core\\Response'; $this->instance_classes['router'] = '\\App\\Core\\Router'; $this->instance_classes['modelInfoRepository'] = '\\VulnModule\\Config\\ModelInfoRepository'; $this->instance_classes['dispatcher'] = '\\App\\EventDispatcher\\EventDispatcher'; $this->instance_classes['restRouteMatcher'] = '\\App\\Rest\\RouteMatcher'; $this->instance_classes['restService'] = '\\App\\Rest\\RestService'; $this->instance_classes['restAuthFactory'] = '\\App\\Rest\\Auth\\AuthFactory'; $this->instance_classes['installer'] = '\\App\\Installation\\Installer'; $this->instance_classes['cart'] = '\\App\\Cart\\CartService'; $this->instance_classes['container'] = '\\App\\DependencyInjection\\Container'; $this->instance_classes['containerHelper'] = '\\App\\Helpers\\ContainerHelper'; Pixifier::getInstance()->setPixie($this); }
public function __wakeup() { $pixie = Pixifier::getInstance()->getPixie(); $this->pixie = $pixie; $this->conn = $pixie->db->get($this->connection); $this->query = $this->conn->query('select'); $this->query->table($this->table); $this->cached = []; if ($this->_row[$this->id_field]) { $this->_loaded = true; } else { $this->_loaded = false; } // $this->prepare_relations(); }
protected function _getVulnElement() { if ($this->vulnerableElementId) { $pixie = Pixifier::getInstance()->getPixie(); $service = $pixie->vulninjection->service(); $vulnElement = $service->getElementByPath($this->vulnerableElementId); $this->vulnerableElement = $vulnElement ?: new VulnerableElement(); $this->vulnerableElementId = null; } return $this->vulnerableElement; }