Example #1
0
 /**
  * Return null.
  *
  * @return 	null
  */
 public function field()
 {
     $debugBacktrace = debug_backtrace();
     \Beaver\Notifier\Notifier::notify('Request field from property which doesn\'t exist: ' . $this->undefinedPropertyName, $debugBacktrace[0]['file'], $debugBacktrace[0]['line']);
     return null;
 }
Example #2
0
 /**
  * Unset for JSON property. Remove given property from JSON.
  *
  * @param 	string	$propertyName
  * @return 	void
  */
 public function __unset($propertyName)
 {
     if (property_exists($this->jsonDecoded, $propertyName)) {
         unset($this->jsonDecoded->{$propertyName});
     } else {
         $debugBacktrace = debug_backtrace();
         \Beaver\Notifier\Notifier::notify('Undefined property: ' . $propertyName, $debugBacktrace[0]['file'], $debugBacktrace[0]['line']);
     }
 }
Example #3
0
|--------------------------------------------------------------------------
| Application Loader
|--------------------------------------------------------------------------
|
| Loader is first PHP code what is executed, it take care
| of Autoloading Classes, Services and Error Handling.
|
*/
// We don't want to see default PHP errors
error_reporting(0);
// Handler for fatal errors
register_shutdown_function(function () {
    $error = error_get_last();
    if ($error) {
        \Beaver\Notifier\Notifier::crash($error['message'], $error['file'], $error['line']);
    }
    \Beaver\Notifier\Notifier::draw();
});
// Handler for warnings and notices
set_error_handler(function ($errorNumber, $errorMessage, $errorFile, $errorLine) {
    \Beaver\Notifier\Notifier::notify($errorMessage, $errorFile, $errorLine);
});
// Autoloading Classes
spl_autoload_register(function ($missingClass) {
    require $_SERVER['DOCUMENT_ROOT'] . '/Vendor/' . str_replace("\\", "/", str_replace("Beaver\\", "", $missingClass)) . '.php';
});
// Getting requested URI
//$requestUri = parse_url($_SERVER['REQUEST_URI']);
//print_r($requestUri);
$c = new \Beaver\Config\Config(__DIR__ . '/Configs/Example.json');
var_dump($c->GlossDiv->field());