本文整理汇总了PHP中Params::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Params::get方法的具体用法?PHP Params::get怎么用?PHP Params::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Params
的用法示例。
在下文中一共展示了Params::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isEnable
/**
* @return bool
*/
protected static function isEnable()
{
if (self::$isEnable === null) {
self::$isEnable = (bool) Params::get('debug', false);
}
return self::$isEnable;
}
示例2: testParamsNotset
function testParamsNotset()
{
$_POST["__not_set_hello"] = 5;
Params::clear();
Params::importFromPost();
$this->assertTrue(Params::is_set("hello"), "Il parametro hello non e' stato caricato!!");
$this->assertEqual(Params::get("hello"), "5", "Il parametro hello non e' stato caricato!!");
unset($_POST["__not_set_hello"]);
}
示例3: send
function send()
{
$success_message = Params::get("success_message");
$em = new EMail(Params::get("email"), Params::get("dest_address"), "Nuovo messaggio ricevuto", EMail::HTML_FORMAT);
$vars = array("first_name" => Params::get("first_name"), "last_name" => Params::get("last_name"), "message" => Params::get("message"));
$em->render_and_send("include/mail/message.php.inc", $vars);
Flash::ok(Params::get($success_message));
return Redirect::success();
}
示例4: login
function login()
{
if (Params::get("username") == Config::instance()->ADMIN_USERNAME && Params::get("password") == Config::instance()->ADMIN_PASSWORD) {
Session::set("/session/type", "admin");
Session::set("/session/username", Params::get("username"));
Session::set("/session/ip", Request::getRemoteIp());
Session::set("/session/timestamp_inizio_sessione", time());
return Redirect::success();
} else {
return Redirect::failure();
}
}
示例5: by_chiave
function by_chiave()
{
$chiave = Params::get("chiave");
$peer = $this->__myPeer();
$peer->chiave__EQUAL($chiave);
$results = $peer->find();
if (count($results) > 0) {
$do = $results[0];
} else {
$do = null;
}
return ActiveRecordUtils::toArray($do);
}
示例6: delete
function delete()
{
$peer = new DocumentiPeer();
$do = $peer->find_by_id(Params::get("id"));
$final_path = $do->save_folder . $do->hash_name;
$f = new File($final_path);
$f->delete();
$peer->delete($do);
if (is_html()) {
Flash::ok("Documento eliminato con successo.");
return Redirect::success();
} else {
return Result::ok();
}
}
示例7: delete
function delete()
{
$nome_categoria = Params::get("nome_categoria");
$nome_modulo = Params::get("nome_modulo");
if ($nome_categoria !== ModuleUtils::FRAMEWORK_CATEGORY_NAME && $nome_modulo !== ModuleUtils::FRAMEWORK_MODULE_NAME) {
$path = AvailableModules::get_available_module_path($nome_categoria, $nome_modulo);
$d = new Dir($path);
$d->delete(true);
Flash::ok("Modulo " . $nome_categoria . "/" . $nome_modulo . " eliminato con successo!!");
return Redirect::success();
} else {
Flash::error("Impossibile eliminare il modulo " . $nome_categoria . "/" . $nome_modulo);
return Redirect::failure();
}
}
示例8: get_rotator
function get_rotator()
{
$result = array();
$result["rotator_name"] = Params::get("name");
$result["image_list"] = array();
$d = new Dir(self::ROTATOR_GALLERIES_ROOT_PATH . $result["rotator_name"] . "/");
if ($d->exists()) {
$files = $d->listFiles();
foreach ($files as $f) {
if ($f->isFile()) {
$img = array();
$img["path"] = $f->getPath();
$img["title"] = str_replace("_", " ", $f->getName());
$result["image_list"][] = $img;
}
}
} else {
echo "Rotator gallery directory not found! : " . $d->getPath();
}
return $result;
}
示例9: get_gallery
function get_gallery()
{
$gallery_name = Params::get("gallery_name");
$result = array();
$result["gallery_name"] = $gallery_name;
$d = new Dir(self::GALLERY_ROOT_PATH . $gallery_name);
$files = $d->listFiles();
$image_list = array();
foreach ($files as $f) {
if ($f->isFile() && $f->getExtension() != ".ini") {
$image = array();
$image["path"] = $f->getPath();
$image["title"] = str_replace("_", " ", $f->getName());
$image_list[$f->getFilename()] = $image;
}
}
$gallery_dir = new Dir(self::GALLERY_ROOT_PATH . $gallery_name . DS);
$found_files = $gallery_dir->findFilesEndingWith("gallery.ini");
if (count($found_files) > 0) {
$gallery_ini_file = $found_files[0];
$gallery_props = PropertiesUtils::readFromFile($gallery_ini_file, true);
$enhanced_image_list = array();
foreach ($section as $s) {
$path = $s["path"];
if (strpos($path, "DS") === 0) {
$new_image["path"] = $path;
} else {
$new_image["path"] = self::GALLERY_ROOT_PATH . $gallery_name . $s["path"];
}
$f = new File($new_image["path"]);
$new_image["title"] = isset($s["title"]) ? $s["title"] : str_replace("_", " ", $f->getName());
$new_image["description"] = isset($s["description"]) ? $s["description"] : null;
$enhanced_image_list[] = $new_image;
}
$result["image_list"] = $enhanced_image_list;
} else {
$result["image_list"] = $image_list;
}
return $result;
}
示例10: delete
function delete()
{
$peer = $this->__myPeer();
if ($this->__dump_enabled()) {
$peer->__dump_sql();
}
$error_messages = $this->__deleteErrors();
$primary_key_fields = $peer->__getPrimaryKeyFields();
if (!$error_messages) {
$do = $peer->find_by_id(Params::get($primary_key_fields[0]));
$this->__additionalDeleteLogic($do);
$peer->delete($do);
}
return $this->__defaultReturn($this->__deleteMessage(), $error_messages);
}
示例11: show_persons
function show_persons()
{
$obj = new Params();
$filter = $obj->get();
if (isset($filter["filter"])) {
//Get personal date values
if ($filter['name']) {
$personal .= " `name`='{$filter['name']}' and ";
}
if ($filter['surname']) {
$personal .= " `surname`='{$filter['surname']}' and ";
}
if ($filter['age']) {
$personal .= " `age` BETWEEN '{$filter['age']}' AND ";
} else {
$personal .= " `age` BETWEEN '0' AND ";
}
if ($filter['ageto']) {
$personal .= " '{$filter['ageto']}' and ";
} else {
$personal .= " '100' and ";
}
//Get person category
if ($filter['category']) {
$cat_id = get_id_by_name('Categories', $filter['category']);
}
//Get persons marks
$filter_status = array();
$filter_status = filter_by_pers_dates($personal);
$ides = implode(',', $filter_status);
if ($ides) {
$pers_ides_str = " and `Pers_ID` IN (" . $ides . ")";
if ($cat_id) {
$filter_status = filter_by_category($cat_id, $pers_ides_str);
if (filter_by_category($cat_id, $pers_ides_str)) {
$ides = implode(',', $filter_status);
if ($ides) {
$pers_ides_str = " and `Pers_ID` IN (" . $ides . ")";
}
}
}
$subj = get_subjects();
$filter_status_copy = $filter_status;
foreach ($subj as $id => $name) {
if ($filter["subj" . $id] || $filter["subjto" . $id]) {
$marks = subject_marks_limit($name, $filter["subj" . $id], $filter["subjto" . $id], $pers_ides_str);
$marks_filter[$id] = filter_by_subjects_marks($marks);
}
if ($marks_filter[$id] === NULL) {
$marks_filter[$id] = $filter_status;
}
$filter_status_copy = array_uintersect($filter_status_copy, $marks_filter[$id], "strcasecmp");
}
$filter_status = $filter_status_copy;
}
//Get personal dates
$persons = get_persons_by_ides($filter_status);
show_filter_result($persons);
}
}
示例12: call
<br />
<br />
Seleziona l'immagine da utilizzare per la vetrina :
<br />
<br />
<?php
$id_prodotto_servizio = Params::get("id_prodotto_servizio");
$elenco_immagini = call("prodotto_servizio", "index_immagini", array("__filter_id_prodotto_servizio__EQUAL" => $id_prodotto_servizio));
$params = array("elenco_oggetti" => $elenco_immagini, "blocco_presentazione" => "vetrine/prodotti_servizi/__select_immagine_prodotto_servizio");
include_block("table/show_in_grid", $params);
示例13: elimina_prodotto_servizio_vetrina
function elimina_prodotto_servizio_vetrina()
{
$peer = new ProdottoServizioVetrinaPeer();
$do = $peer->find_by_id(Params::get("id_prodotto_servizio_vetrina"));
$peer->delete($do);
if (is_html()) {
return Redirect::success();
} else {
return Result::ok();
}
}
示例14: getMail
/**
* Instance de PHPMailer
* @return instance
*/
public static function getMail()
{
$params = \Params::get();
if (self::$emailconfig == null) {
$instance = self::GetConfig();
self::$emailconfig = new PHPMailer();
self::$emailconfig->isSMTP();
self::$emailconfig->isHTML(true);
self::$emailconfig->Host = $instance->settings['Host'];
self::$emailconfig->SMTPAuth = $instance->settings['SMTPAuth'];
self::$emailconfig->Username = $instance->settings['Username'];
self::$emailconfig->Password = $instance->settings['Password'];
self::$emailconfig->SMTPSecure = $instance->settings['SMTPSecure'];
self::$emailconfig->Port = $instance->settings['Port'];
self::$emailconfig->setFrom('alain.dessi@laposte.net', 'Sous L\'olivier');
self::$emailconfig->From = 'sous l\'olivier';
self::$emailconfig->CharSet = $instance->settings['CharSet'];
self::$emailconfig->CharSet = $instance->settings['CharSet'];
self::$emailconfig->addCC($params->owner_email);
self::$emailconfig->addAddress('alain.dessi@laposte.net', 'DESSI Alain');
}
return self::$emailconfig;
}
示例15: delete
function delete()
{
$peer = new FolderPeer();
$result = $peer->find_by_id(Params::get("id"));
$path = $result["path"];
$nome = $result["nome"];
$full_path = $path . $nome . "/";
$tipo = $result["tipo"];
$tipo_tokens = explode("_", $tipo);
$controller_name = $tipo_tokens[1];
call($controller_name, "delete_by_path", array("path" => $full_path));
$peer->delete($result);
if (is_html()) {
Flash::ok("Cartella eliminata con successo.");
return Redirect::success();
} else {
return Result::ok();
}
}