当前位置: 首页>>代码示例>>PHP>>正文


PHP Tools::atk_var_dump方法代码示例

本文整理汇总了PHP中Sintattica\Atk\Core\Tools::atk_var_dump方法的典型用法代码示例。如果您正苦于以下问题:PHP Tools::atk_var_dump方法的具体用法?PHP Tools::atk_var_dump怎么用?PHP Tools::atk_var_dump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sintattica\Atk\Core\Tools的用法示例。


在下文中一共展示了Tools::atk_var_dump方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: runInfozipCommand

 /**
  * Run the (un)zip command.
  *
  * @param int $type The type of zip (ATK_ZIP or ATK_UNZIP)
  * @param string $params The parameters for zipping or unzipping
  *
  * @return string The return code
  */
 public function runInfozipCommand($type, $params)
 {
     $command = $this->getInfozipCommand($type, $params);
     $output = [];
     Tools::atkdebug("atkZip->runInfozipCommand: Executing command: {$command}");
     $returncode = null;
     //var for catching returncode fro exec.
     exec($command, $output, $returncode);
     Tools::atkdebug('atkZip->runInfozipCommand: Return code was: ' . $returncode);
     Tools::atk_var_dump($output, 'atkZip->runInfozipCommand: Console output');
     return $returncode;
 }
开发者ID:sintattica,项目名称:atk,代码行数:20,代码来源:Zip.php

示例2: deleteDataRowForSelector

 /**
  * Delete a row in the session for a given ATK/SQL selector.
  *
  * @param string $selector ATK/SQL selector
  *
  * @return bool Wether the deleting succeeded
  */
 public function deleteDataRowForSelector($selector)
 {
     Tools::atk_var_dump($selector, __CLASS__ . '->' . __METHOD__ . ': Deleting row from session store with key: ' . $this->getKey());
     $data = $this->getData();
     if (!$data) {
         return false;
     }
     $row_key = self::getRowKeyFromSelector($selector);
     if (!self::isValidRowKey($row_key, $data)) {
         return false;
     }
     unset($data[$row_key]);
     $this->setData($data);
     return true;
 }
开发者ID:sintattica,项目名称:atk,代码行数:22,代码来源:SessionStore.php

示例3: loadCriteria

 /**
  * Load search criteria.
  *
  * @param string $name name of the search criteria
  *
  * @return array search criteria
  */
 public function loadCriteria($name)
 {
     if (!$this->tableExist()) {
         return [];
     }
     $db = $this->m_node->getDb();
     $query = "SELECT c.criteria FROM {$this->m_table} c WHERE c.nodetype = '%s' AND UPPER(c.name) = UPPER('%s') AND handlertype = '%s'";
     Tools::atk_var_dump(sprintf($query, $this->m_node->atkNodeUri(), Tools::escapeSQL($name), $this->getSearchHandlerType()), 'loadCriteria query');
     list($row) = $db->getRows(sprintf($query, $this->m_node->atkNodeUri(), Tools::escapeSQL($name), $this->getSearchHandlerType()));
     $criteria = $row == null ? null : unserialize($row['criteria']);
     Tools::atk_var_dump($criteria, 'loadCriteria criteria');
     return $criteria;
 }
开发者ID:sintattica,项目名称:atk,代码行数:20,代码来源:AbstractSearchHandler.php

示例4: getAllParsedFieldsAsArray

 /**
  * Parse data into the string and return all fields as an array.
  *
  * @param array $data
  * @param bool $split_tags_and_fields return fields and separators separated in resultarray (separators are not used in query, so quotes aren't used)
  *
  * @return array
  */
 public function getAllParsedFieldsAsArray($data, $split_tags_and_fields = false)
 {
     $matches = $this->getAllFieldsAsArray();
     Tools::atk_var_dump($matches, 'MATCHES' . ($split_tags_and_fields ? ' (split tags and separators)' : ''));
     $fields = [];
     if (is_array($matches)) {
         foreach ($matches[0] as $match) {
             // Check if need to parse the match
             if (strpos($match, '[') !== false && strpos($match, ']') !== false) {
                 $parser = new self($match);
                 if ($split_tags_and_fields) {
                     $fields['tags'][] = $parser->parse($data);
                 } else {
                     $fields[] = $parser->parse($data);
                 }
             } else {
                 if ($split_tags_and_fields) {
                     $fields['separators'][] = $match;
                 } else {
                     $fields[] = "'" . $match . "'";
                 }
             }
         }
     }
     return $fields;
 }
开发者ID:sintattica,项目名称:atk,代码行数:34,代码来源:StringParser.php

示例5: smarty_modifier_atkvardump

/**
 * Dump variable to debug output.
 *
 * Usage: {$sometplvar|atkvardump:label}
 *
 * @author Boy Baukema <boy@ibuildings.nl>
 *
 * @param mixed $data
 * @param string $name Label for the dump
 *
 * @return string
 */
function smarty_modifier_atkvardump($data, $name = '')
{
    Tools::atk_var_dump($data, $name);
    return $data;
}
开发者ID:sintattica,项目名称:atk,代码行数:17,代码来源:modifier.atkvardump.php

示例6: smartSearchCondition

 /**
  * Creates a smart search condition for a given search value, and adds it
  * to the query that will be used for performing the actual search.
  *
  * @param int $id The unique smart search criterium identifier.
  * @param int $nr The element number in the path.
  * @param array $path The remaining attribute path.
  * @param Query $query The query to which the condition will be added.
  * @param string $ownerAlias The owner table alias to use.
  * @param mixed $value The value the user has entered in the searchbox.
  * @param string $mode The searchmode to use.
  */
 public function smartSearchCondition($id, $nr, $path, $query, $ownerAlias, $value, $mode)
 {
     // default implementation doesn't supported nested paths, this method
     // should be overriden by relations etc. if they want to support this
     if (count($path) > 0) {
         Tools::atk_var_dump($path, 'Invalid search path for ' . $this->m_ownerInstance->atkNodeUri() . '#' . $this->fieldName() . ', ignoring criterium!');
     } else {
         $this->searchCondition($query, $ownerAlias, $value, $mode);
     }
 }
开发者ID:sintattica,项目名称:atk,代码行数:22,代码来源:Attribute.php

示例7: deleteDb

 /**
  * This function overrides the deleteDb function to delete a file
  * from the selected directory.
  *
  * @param string $selector The identifier of the file that should be deleted
  *
  * @return bool The result of the file deletion
  */
 public function deleteDb($selector)
 {
     $sessmngr = SessionManager::getInstance();
     $this->m_dir = $this->stripDir($sessmngr->stackVar('dirname'));
     $decodedselector = Tools::decodeKeyValuePair($selector);
     $filename = $decodedselector['dummy.filename'];
     Tools::atk_var_dump($this->m_dir, 'm_dir');
     Tools::atk_var_dump($filename, 'filename');
     if (strpos($filename, '..') === false) {
         unlink($this->m_dir . $filename);
         Tools::atkdebug('Deleted ' . $this->m_dir . $filename);
     } else {
         Tools::atkerror('Cannot unlink relative files. Possible hack attempt detected!');
     }
     return true;
 }
开发者ID:sintattica,项目名称:atk,代码行数:24,代码来源:FileEditor.php


注:本文中的Sintattica\Atk\Core\Tools::atk_var_dump方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。