1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00
Files
processwire/wire/core/NullField.php

20 lines
376 B
PHP

<?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 implements WireNull {
public function get($key) {
if($key == 'id') return 0;
if($key == 'name') return '';
return parent::get($key);
}
}