本文整理汇总了PHP中Zend_Debug类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Debug类的具体用法?PHP Zend_Debug怎么用?PHP Zend_Debug使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_Debug类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: isValid
/**
* Vaidate the file MIME type.
*
* @param string $file
* @return bool
*/
public function isValid($file)
{
$this->_file = $file;
// Detect the definitive MIME type.
$detect = new Omeka_File_MimeType_Detect($this->_file);
$this->_mimeType = $detect->detect();
// Set the relevant MIME type whitelist.
if ($this->_customWhitelist) {
$whitelist = $this->_customWhitelist;
} else {
$whitelist = self::DEFAULT_WHITELIST;
}
// Validate the MIME type against the whitelist.
if (in_array($this->_mimeType, explode(',', $whitelist))) {
// Valid MIME type. Set the MIME type to the ingest class so that it
// can assign it to the File record. Doing this avoids more than one
// call to the MIME type detection class.
Omeka_File_Ingest_AbstractIngest::$mimeType = $this->_mimeType;
return true;
} else {
// Invalid MIME type.
Zend_Debug::dump(explode(',', $whitelist));
$this->_error(self::INVALID_TYPE);
return false;
}
}
开发者ID:kyfr59,项目名称:cg35,代码行数:32,代码来源:MimeType.php
示例2: postProcess
public function postProcess(Axis_Sales_Model_Order_Row $order)
{
$this->saveCreditCard($order);
$cc = $this->getCreditCard();
$options = $this->getLineItemDetails();
$billing = $order->getBilling();
$optionsAll = array_merge($options, array('STREET' => $billing->getStreetAddress(), 'ZIP' => $billing->getPostcode(), 'BUTTONSOURCE' => $this->_buttonSourceDP, 'CURRENCY' => $this->getBaseCurrencyCode(), 'IPADDRESS' => $_SERVER['REMOTE_ADDR']));
if ($cc->getCcIssueMonth() && $cc->getCcIssueYear()) {
$optionsAll['CARDSTART'] = $cc->getCcIssueMonth() . substr($cc->getCcIssueYear(), -2);
}
$optionsNVP = array('CITY' => $billing->getCity(), 'STATE' => $billing->getZone()->getCode() ? $billing->getZone()->getCode() : $billing->getCity(), 'COUNTRYCODE' => $billing->getCountry()->getIsoCode2(), 'EXPDATE' => $cc->getCcExpiresMonth() . $cc->getCcExpiresYear(), 'PAYMENTACTION' => $this->_config->paymentAction == 'Authorization' ? 'Authorization' : 'Sale');
$delivery = $order->getDelivery();
$optionsShip = array('SHIPTONAME' => $delivery->getFirstname() . ' ' . $delivery->getLastname(), 'SHIPTOSTREET' => $delivery->getStreetAddress(), 'SHIPTOSTREET2' => $delivery->getSuburb(), 'SHIPTOCITY' => $delivery->getCity(), 'SHIPTOZIP' => $delivery->getPostcode(), 'SHIPTOSTATE' => $delivery->getZone()->getCode() ? $delivery->getZone()->getCode() : $delivery->getCity(), 'SHIPTOCOUNTRYCODE' => $delivery->getCountry()->getIsoCode2());
// if these optional parameters are blank, remove them from transaction
if (isset($optionsShip['SHIPTOSTREET2']) && empty($optionsShip['SHIPTOSTREET2'])) {
unset($optionsShip['SHIPTOSTREET2']);
}
$response = $this->getApi()->DoDirectPayment(sprintf('%.2f', $this->getAmountInBaseCurrency($order->order_total)), $cc->getCcNumber(), $cc->getCcCvv(), $cc->getCcExpiresMonth() . $cc->getCcExpiresYear(), $billing->getFirstname(), $billing->getLastname(), $cc->getCcType(), $optionsAll, array_merge($optionsNVP, $optionsShip));
if ($response['ACK'] != 'Success') {
$this->log("Response : " . Zend_Debug::dump($response, null, false));
foreach ($this->getMessages($response) as $severity => $messages) {
Axis::message()->batchAdd($messages, $severity);
}
throw new Axis_Exception('DoDirectPayment Failure');
}
}
开发者ID:baisoo,项目名称:axiscommerce,代码行数:26,代码来源:Direct.php
示例3: _afterSave
protected function _afterSave()
{
$payment = $this->getPayment();
if ($payment->getStatus() == 3) {
if ($payment->getPaymentMethod() == 'bank') {
$verify = Mage::getModel('affiliateplus/payment_verify')->loadExist($payment->getAccountId(), $this->getBankaccountId(), 'bank');
if (!$verify->isVerified()) {
try {
$verify->setVerified(1)->save();
} catch (Exception $e) {
}
}
}
} elseif ($payment->getStatus() == 1) {
if ($payment->getPaymentMethod() == 'bank') {
$verify = Mage::getModel('affiliateplus/payment_verify')->loadExist($payment->getAccountId(), 0, 'bank');
if ($verify->getId()) {
try {
$verify->setData('field', $this->getBankaccountId())->save();
} catch (Exception $e) {
Zend_Debug::dump($e->getMessage());
}
}
}
}
}
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:26,代码来源:Bank.php
示例4: debug
protected function debug()
{
$vars = func_get_args();
foreach ($vars as $var) {
Zend_Debug::dump($var);
}
}
开发者ID:sasezaki,项目名称:spizer,代码行数:7,代码来源:NotGetImageRequestSender.php
示例5: smsLinkAction
public function smsLinkAction()
{
$ObtenerNumero = new Core_Utils_Utils();
$telefono = $ObtenerNumero->obtenerNumero();
if ($this->_request->isGet()) {
$codigo = $this->_getParam('i', '');
try {
if (isset($codigo) && $codigo != '' && $telefono != '') {
$resultSms = $this->_GetResultSoap->_obtenerSMSLinkEnFulltracks($codigo);
Zend_Debug::dump($resultSms);
$responseSmnLinkFt = $resultSms->obtenerSMSLinkEnFulltracksResult;
if ($responseSmnLinkFt->esValido == true && $responseSmnLinkFt->numuser == $telefono) {
$this->_redirect('/pe/fulltracks');
} else {
$this->_redirect('http://m.entretenimiento.entel.pe');
}
} else {
$this->_redirect('http://m.entretenimiento.entel.pe');
}
} catch (Exception $e) {
$this->_redirect('http://m.entretenimiento.entel.pe');
}
} else {
$this->_redirect('http://m.entretenimiento.entel.pe');
}
}
开发者ID:josmel,项目名称:DevelEntelBipPe,代码行数:26,代码来源:FreeController.php
示例6: authenticate
public function authenticate()
{
$consumer = new Zend_Oauth2_Consumer($this->_config);
try {
if (isset($_GET['code']) && !empty($_GET['code'])) {
$options = array('client_id' => $this->_config['consumerId'], 'redirect_uri' => $this->_config['callbackUrl'], 'client_secret' => $this->_config['consumerSecret'], 'code' => trim($_GET['code']), 'grant_type' => 'authorization_code');
$accessTokenInfo = $consumer->getAccessToken($options);
Zend_Debug::dump($accessTokenInfo);
$accessToken = $accessTokenInfo['access_token'];
$options = array('app_id' => $this->_config['consumerId'], 'method' => 'users.getInfo', 'secure' => 1, 'session_key' => $accessToken);
$sign = $this->getSign($options, $accessToken);
$options['sig'] = $sign;
$identity = $consumer->getIdentity($options, 'POST');
$identity = reset($identity);
$identity['CONSUMER_ID'] = $this->_consumerId;
return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, (object) $identity);
} elseif (!isset($_GET['error'])) {
$consumer->redirect(array('client_id' => $this->_config['consumerId'], 'redirect_uri' => $this->_config['callbackUrl'], 'response_type' => 'code'));
} else {
throw new Exception($_GET['error']);
}
} catch (Exception $e) {
return new Zend_Auth_Result(Zend_Auth_Result::FAILURE, false, array($e->getMessage()));
}
}
开发者ID:sb15,项目名称:zend-ex-legacy,代码行数:25,代码来源:Mailru.php
示例7: getblockAction
public function getblockAction()
{
$param = Mage::app()->getFrontController()->getRequest()->getParams();
if ($param["create"] !== "false") {
$this->loadLayout();
if ($item_block = $this->getLayout()->getBlock($param["name"])) {
if ($param["template"]) {
$item_block->setTemplate($param["template"]);
}
}
} else {
$item_layout = Mage::getSingleton('core/layout');
if ($item_block = $item_layout->createBlock($param["class_name"], $param["name"])) {
if ($param["template"]) {
$item_block->setTemplate($param["template"]);
}
} else {
echo "not exist this class " . $param["class_name"];
die;
}
}
if ($param["onlychild"] == "true") {
Zend_Debug::dump($item_block->getChild());
} else {
echo $item_block->renderView();
}
exit;
}
开发者ID:omusico,项目名称:losvineros,代码行数:28,代码来源:IndexController.php
示例8: errorAction
public function errorAction()
{
$errors = $this->_getParam('error_handler');
Zend_Debug::dump($errors);
exit;
switch ($errors->type) {
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
// 404 error -- controller or action not found
$this->getResponse()->setHttpResponseCode(404);
$this->view->message = 'Page not found';
break;
default:
// application error
$this->getResponse()->setHttpResponseCode(500);
$this->view->message = 'Application error';
break;
}
// Log exception, if logger available
if ($log = $this->getLog()) {
$log->crit($this->view->message, $errors->exception);
}
// conditionally display exceptions
if ($this->getInvokeArg('displayExceptions') == true) {
$this->view->exception = $errors->exception;
}
$this->view->request = $errors->request;
//$this->view->layout()->disableLayout();
}
开发者ID:banyan,项目名称:alchook,代码行数:30,代码来源:ErrorController.php
示例9: _updateUserDb
private function _updateUserDb()
{
$fb_users = HTS_Util::getDbTable('users');
$fb_user = $fb_users->findOneByIdSocial($this->_id_social);
if (empty($fb_user)) {
$user_profile = $this->_social->api('/me');
if (FB_DEBUG) {
Zend_Debug::dump($user_profile);
}
$fb_user = HTS_Util::getDbRow('users');
$birthday = new Zend_Date(@$user_profile['Birthday'], 'dd/MM/yyyy');
$updated_time = new Zend_Date(@$user_profile['Updated_time']);
//TODO some values are null -> undefined index warning
$fb_user->id_social = $user_profile['Id'];
$fb_user->name = $user_profile['Name'];
$fb_user->first_name = @$user_profile['First_name'];
$fb_user->middle_name = @$user_profile['Middle_name'];
$fb_user->last_name = @$user_profile['Last_name'];
$fb_user->link = $user_profile['Link'];
$fb_user->birthday = @$birthday->toString('yyyy/MM/dd');
$fb_user->gender = $user_profile['Gender'];
$fb_user->timezone = @$user_profile['Timezone'];
$fb_user->locale = @$user_profile['Locale'];
$fb_user->time_created = time();
$fb_user->time_modified = time();
$fb_user->time_social_modified = $updated_time->toValue();
$this->_id_user = $fb_user->save();
}
$this->_user = $fb_user;
$this->_id_user = $fb_user->id;
}
开发者ID:BGCX067,项目名称:facebook-store-svn-to-git,代码行数:31,代码来源:Govn.php
示例10: getSingle
public function getSingle($text)
{
$args = array('appid' => $this->_appid, 'documentContent' => urlencode($text . ' ' . $this->_suffix), 'documentType' => 'text/plain', 'outputType' => 'xml');
$response = $this->curl($text, $args);
// Now parse the response using PHP SimpleXML
$xml = simplexml_load_string($response);
Zend_Debug::dump($xml);
$place = new Place();
if (isset($xml->results->place->name)) {
$place->name = $xml->results->place->name;
}
if (isset($xml->results->place->centroid->longitude)) {
$place->longitude = $xml->results->place->centroid->longitude;
}
if (isset($xml->results->place->centroid->latitude)) {
$place->latitude = $xml->results->place->centroid->latitude;
}
if (isset($xml->results->place->woeid)) {
$place->woeid = $xml->results->place->woeid;
}
if (isset($xml->results->place->placeTypeName)) {
$place->type = $xml->results->place->placeTypeName;
}
if (isset($xml->results->place->postal)) {
$place->postal = $xml->results->place->postal;
}
return $place;
}
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:28,代码来源:Placemaker.php
示例11: copyFrom
public static function copyFrom(Twig_Node_Expression_GetAttr $node)
{
Zend_Debug::dump($node->__toString());
$node = new Zwig_Node_Expression_GetAttr($node->node, $node->attribute, $node->arguments, $node['type'], $node->lineno);
Zend_Debug::dump($node->__toString());
return $node;
}
开发者ID:BGCX262,项目名称:zwig-svn-to-git,代码行数:7,代码来源:GetAttr.php
示例12: loginAction
public function loginAction()
{
//$this->_helper->layout()->disableLayout();
$formAuthLogin = new Form_Auth_Login();
$this->view->form = $formAuthLogin;
if ($this->getRequest()->isPost()) {
if ($formAuthLogin->isValid($this->getRequest()->getPost())) {
$dadosAutenticacao = $formAuthLogin->getValues();
$db = Zend_Registry::get('db');
$authAdapter = new Zend_Auth_Adapter_DbTable($db);
try {
$authAdapter->setTableName('administrador')->setIdentityColumn('administrador_email')->setCredentialColumn('administrador_senha')->setIdentity($dadosAutenticacao['administrador_email'])->setCredential(md5($dadosAutenticacao['administrador_senha']));
$authAdapter->getDbSelect()->where("administrador_ativo = ?", 1);
$auth = Zend_Auth::getInstance();
$result = $auth->authenticate($authAdapter);
if ($result->isValid()) {
$dadosAdministrador = array();
Zend_Auth::getInstance()->getStorage()->write($dadosAdministrador);
$this->_redirect("index/");
} else {
$this->_helper->flashMessenger->addMessage(array('class' => 'alert alert-danger', 'message' => 'Usuário e/ou senha inválidos!'));
Zend_Debug::dump($result);
die;
$this->_redirect("admin/autenticacao/login");
}
} catch (Exception $e) {
$this->_helper->flashMessenger->addMessage(array('class' => 'alert alert-danger', 'message' => 'Houve um erro na autenticação - ' . $e->getMessage()));
$this->_redirect("auth/login");
}
}
}
}
开发者ID:nandorodpires2,项目名称:k-sys,代码行数:32,代码来源:AuthController.php
示例13: process
public function process(Zend_Controller_Request_Abstract $request)
{
$this->customSetParam = $request->getParam('attributeSet');
//Zend_Debug::dump($this->customSetParam);
//Zend_Debug::dump($_FILES['customAttributeDetailImage']);
foreach ($this->customSetParam as $k => $v) {
$this->customSetName[] = $k;
}
Zend_Debug::dump($this->customSetName[0]);
foreach ($this->customSetParam[$this->customSetName[0]]['name'] as $k => $v) {
$this->customSetKey[] = $k;
}
Zend_Debug::dump($this->customSetKey);
$this->customSet->name_of_set = $this->customSetName[0];
$this->customSet->uploader_id = $this->userID;
//echo $this->table;
//echo $this->userID;
//echo $this->customSetName[0];
if (!DatabaseObject_Helper_ManageAttribute::confirmattributenamewithuploader($this->db, $this->table, $this->userID, $this->customSetName[0])) {
$this->customSet->save();
$this->attributeID = $this->customSet->getId();
//echo 'here at no error';
return true;
} else {
//echo 'here at errors';
echo 'duplicate, there is an error';
$this->addError('duplicate', 'this is a duplicate');
return !$this->hasError();
}
//return true if no errors have occurred
}
开发者ID:vinnivinsachi,项目名称:Vincent-DR,代码行数:31,代码来源:CustomAttribute.php
示例14: hasReceivedThisMessage
public function hasReceivedThisMessage($device_id, $message_id)
{
$select = $this->_db->select()->from(array('pm' => 'push_messages'), array())->join(array('pdm' => 'push_delivered_message'), 'pdm.app_id = pm.app_id', array('pm.message_id'))->where('pm.message_id = ?', $message_id)->where('pdm.device_type = ?', Push_Model_Iphone_Device::DEVICE_TYPE);
Zend_Debug::dump($this->_db->fetchOne($select));
die;
return $this->_db->fetchOne($select);
}
开发者ID:bklein01,项目名称:SiberianCMS,代码行数:7,代码来源:Device.php
示例15: upsertAddress
function upsertAddress($data)
{
$websiteId = Mage::app()->getWebsite()->getId();
$store = Mage::app()->getStore();
$customer = Mage::getModel("customer/customer");
$customer->setWebsiteId($websiteId);
$customer->setStore($store);
$customer->loadByEmail($data['email']);
if ($customer->getId()) {
$address = Mage::getModel("customer/address");
$address->setCustomerId($customer->getId())->setFirstname($data['first_name'])->setLastname($data['last_name'])->setCompant($data['company'])->setTelephone($data['phone'])->setStreetFull(array($data['street_1'], $data['street_2']))->setCity($data['city'])->setCountryId($data['country'])->setPostcode($data['zip_code']);
$region = Mage::getModel('directory/region')->loadByCode($data['state_iso2'], $data['country']);
$state_id = $region->getId();
if ($region->getId()) {
$address->setRegionId($state_id);
} else {
if ($data['state'] !== '') {
$address->setRegion($data['state']);
}
}
$address->setIsDefaultBilling('1')->setIsDefaultShipping('1')->setSaveInAddressBook('1');
try {
$address->save();
} catch (Exception $e) {
Zend_Debug::dump($e->getMessage());
}
}
}
开发者ID:peachdt,项目名称:small_projects,代码行数:28,代码来源:importAddress.php
示例16: submitAction
public function submitAction()
{
$this->logger->info('type_projet : submitAction()');
$table_reponse = array('message' => '');
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender(TRUE);
$data_from_user = $this->_getAllParams();
if (!empty($data_from_user['nom_type_projet'])) {
$data_to_save = array('nom_type_projet' => $data_from_user['nom_type_projet']);
$this->logger->info(html_entity_decode(Zend_Debug::dump($data_to_save, $label = null, $echo = false), ENT_COMPAT, "utf-8"));
try {
$this->db->insert('type_projet', $data_to_save);
$this->logger->info('update query : ' . $this->db->getProfiler()->getLastQueryProfile()->getQuery());
$this->logger->info('type de projet ajouter : OUI');
$table_reponse['message'] = 'Le type de projet a été bien ajouter ';
} catch (Zend_Db_Adapter_Exception $e) {
echo $e->getMessage();
}
} else {
$table_reponse['message'] = 'erreur';
}
$this->db->getProfiler()->setEnabled(false);
$json = Zend_Json::encode($table_reponse);
echo $json;
}
开发者ID:razorcell,项目名称:GBADMIN,代码行数:25,代码来源:TypeprojetController.php
示例17: _getOutput
/**
* Generates the output text
*
* @param mixed $var The variable to dump.
* @param string $label OPTIONAL Label to prepend to output.
* @return string
*/
protected function _getOutput($var, $label = null)
{
// format the label
// if it is a object, format with its properties
$trace = debug_backtrace();
$l = 'FILE: ' . basename($trace[0]['file']) . '<br/>';
$l .= 'FUNCTION: ' . $trace[0]['function'] . '<br/>';
$l .= 'LINE: ' . $trace[0]['line'] . '<br/>';
$l .= 'PATH: ' . $trace[0]['file'];
if (is_object($label)) {
$label = 'CLASS: ' . get_class($label);
} else {
$label = $label === null ? '' : rtrim($label) . ' ';
}
$label = '<header style="
border-bottom: 2px solid #c99;
color: #752201;
cursor:pointer;"
>' . ' <span class="arrow">↓</span> DEBUG: ' . $label . '</header>';
$output = Zend_Debug::dump($var, NULL, false);
$output = '<article class="debug"
style="margin: 1em;
padding: 0 1em;
background-color: #ddd;"
>' . $label . '<section style="display:none">' . '<small>' . $l . '</small>' . $output . '</section>' . '</article>';
return $output;
}
开发者ID:brunopbaffonso,项目名称:ongonline,代码行数:34,代码来源:Debug.php
示例18: delete
/**
* Delete entries
*
* @param array|string $where SQL WHERE clause(s)
* @return int|string
*/
public function delete($id)
{
$table = $this->getTable();
// Get the parent_role from the role will delete
$role = $this->fetchEntry($id);
//Zend_Debug::dump($role["role_parent"], "rol que eliminamos");
//find the roles have the parent role of the role will delete
$rolsongs = $this->fetchParentRoles($id);
// Zend_Debug::dump($rolsongs["0"]["id"], "el hijo del rol que eliminaremos");
//chance the parent_role of the songs
foreach ($rolsongs as $value) {
$data["role_parent"] = (int) $role["role_parent"];
$data["id"] = $value["id"];
$this->update($data, 'id =' . (int) $value["id"]);
}
//find the users with the role will delete
$users = new User_Model_Users();
$users->getTable();
$arrayusers = $users->fetchUsers($id);
//Zend_Debug::dump($arrayusers,"users with role will delete");
// chance the role to the users
foreach ($arrayusers as $value) {
$data["role_id"] = (int) $rolsongs["0"]["id"];
$data["id"] = $value["id"];
Zend_Debug::dump($data, "data1");
$users->update($data, 'id =' . (int) $value["id"]);
}
$table->delete('id =' . (int) $id);
}
开发者ID:roigrande,项目名称:globalpms,代码行数:35,代码来源:Roles.php
示例19: checkYearFacetAssumption
/**
* Kann verwendet werden wenn es Probleme mit
*
* Solrsearch_IndexControllerTest;;testFacetSortForYearInverted
*
* gibt. Einfache am Anfang des tearDown in ControllerTestCase aufrufen.
*
* $assumption = new AssumptionChecker($this);
* $assumption->checkYearFacetAssumption();
*/
public function checkYearFacetAssumption()
{
$this->testCase->resetRequest();
$this->testCase->resetResponse();
$this->testCase->dispatch('/solrsearch/index/search/searchtype/all');
$searchStrings = array('2011', '2009', '2010', '1978', '2008', '2012', '1979', '1962', '1963', '1975');
$response = $this->testCase->getResponse()->getBody();
$startString = 'id="year_facet"';
$startPos = strpos($response, $startString);
$this->testCase->assertFalse($startPos === false, "'{$startString}' not found, instead: {$response}");
$lastPos = $startPos;
$loopComplete = true;
for ($i = 0; $i < 10; $i++) {
$lastPos = strpos($response, '>' . $searchStrings[$i] . '</a>', $lastPos);
if ($lastPos === false) {
Zend_Debug::dump("'" . $searchStrings[$i] . '\' not found in year facet list (iteration ' . $i . ')');
}
$this->testCase->assertFalse($lastPos === false, "'" . $searchStrings[$i] . '\' not found in year facet list (iteration ' . $i . ')');
if ($lastPos === false) {
break;
$loopComplete = false;
}
}
$this->testCase->assertTrue($loopComplete);
}
开发者ID:belapp,项目名称:opus4-application,代码行数:35,代码来源:AssumptionChecker.php
示例20: dump
function dump($dado, $stop = null)
{
Zend_Debug::dump($dado);
if ($stop) {
exit;
}
}
开发者ID:r4faelaugusto,项目名称:b0l4od0fu7uro,代码行数:7,代码来源:funcoes.php
注:本文中的Zend_Debug类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论