mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 01:34:31 +02:00
Initial commit to new repo (carried over from: https://github.com/ryancramerdesign/ProcessWire/tree/devns)
This commit is contained in:
19
wire/core/NullField.php
Normal file
19
wire/core/NullField.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php namespace ProcessWire;
|
||||
|
||||
/**
|
||||
* ProcessWire NullField
|
||||
*
|
||||
* Represents a Field object that doesn't exist.
|
||||
*
|
||||
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer
|
||||
* https://processwire.com
|
||||
*
|
||||
*/
|
||||
|
||||
class NullField extends Field {
|
||||
public function get($key) {
|
||||
if($key == 'id') return 0;
|
||||
if($key == 'name') return '';
|
||||
return parent::get($key);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user