Welcome Guest, Not a member yet? Register   Sign In
Static variable
#4

[eluser]InsiteFX[/eluser]
Continued:
Code:
// -----------------------------------------------------------------------

/**
  * exists()
  *
  * Checks to see if a property exists.
  *
  * @access public
  * @param string - $index - The property index
  * @param string - $key  - The property key
  * @return bool - TRUE if the property exists otherwise FALSE.
  */
public function exists($index, $key)
{
  return isset($this->properties[$index][$key]);
}

// -----------------------------------------------------------------------

/**
  * clear()
  *
  * Clears out and resets the property arrays.
  *
  * @access public
  * @return void
  */
public function clear()
{
  $this->properties = array(array());
}

// -----------------------------------------------------------------------

/**
  * delete()
  *
  * Deletes a property index key.
  *
  * @access public
  * @param string - $index - The property index
  * @param string - $key  - The property key
  * @return bool
  */
public function delete($index, $key)
{
  if (isset($this->properties[$index][$key]))
  {
   unset($this->properties[$index][$key]);
   return TRUE;
  }

  return FALSE;
}

// -----------------------------------------------------------------------

/**
  * debug_properties()
  *
  * Debug the properties arrays.
  *
  * @access public
  * @return array
  */
public function debug_properties()
{
  return $this->properties;
}

// -----------------------------------------------------------------------

/**
  * Debug Helper
  *
  * Outputs the given variable(s) with formatting and location.
  *
  * @access public
  * @param mixed - variables to be output.
  * @return void
  */
public function var_debug()
{
  list ($callee) = debug_backtrace();

  $arguments = func_get_args();

  $total_arguments = count($arguments);

  echo '<fieldset>';
  echo '<legend>' . $callee['file'] . ' @ line: ' . $callee['line'] . '</legend><pre>';

  $i = 0;

  foreach ($arguments as $argument)
  {
   echo '<strong>Debug #' . (++$i) . ' of ' . $total_arguments . '</strong>: '."<br />";
   var_dump($argument);
   echo "\n";
  }

  echo "</pre>";
  echo "</fieldset><br />";

  exit ('Finished dumping debug variables.');
}

} // End of Class


/* -------------------------------------------------------------------------
* End of file Property.php
* Location: ./application/libraries/Property.php
* -------------------------------------------------------------------------
*/


Messages In This Thread
Static variable - by El Forum - 05-29-2012, 12:32 PM
Static variable - by El Forum - 05-29-2012, 07:39 PM
Static variable - by El Forum - 05-29-2012, 07:42 PM
Static variable - by El Forum - 05-29-2012, 07:42 PM
Static variable - by El Forum - 05-29-2012, 07:44 PM
Static variable - by El Forum - 05-29-2012, 07:57 PM
Static variable - by El Forum - 05-30-2012, 12:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB