Essentially, this is an alias to the Solar_Debug_Var::dump()
method, which buffers the [[php::var_dump | ]] for a variable,
applies some simple formatting for readability, [[php::echo | ]]s
it, and prints with an optional label. Use this for
debugging variables to see exactly what they contain.
/** * * Sets cache entry data. * * @param string $key The entry ID. * * @param mixed $data The data to write into the entry. * * @param int $life A custom lifespan, in seconds, for the entry; if null, * uses the default lifespan for the adapter instance. * * @return bool True on success, false on failure. * */ public function save($key, $data, $life = null) { if (!$this->_active) { return; } // modify the key to add the prefix $key = $this->entry($key); // life value if ($life === null) { $life = $this->_life; } Solar::dump($life, 'life'); // save to apc return apc_store($key, $data, $life); }
<?php require_once 'Solar.php'; Solar::start(); $select = Solar::object('Solar_Sql_Select'); $select->from('sc_bookmarks', '*'); $select->order('id'); $result = $select->fetch('all'); $bookmarks = Solar::object('Solar_Cell_Bookmarks'); foreach ($result as $row) { $data = array('created' => $row['ts_new'], 'updated' => $row['ts_mod'], 'owner_handle' => $row['user_id'], 'editor_handle' => $row['user_id'], 'uri' => $row['uri'], 'subj' => $row['title'], 'summ' => $row['descr'], 'tags' => $row['tags'], 'rank' => $row['rank']); $result = $bookmarks->insert($data); Solar::dump($result); } Solar::stop();