ReadOnlyTraitLaravel/src/ReadOnlyTrait.php

102 lines
1.7 KiB
PHP
Raw Normal View History

2016-03-28 11:15:08 -07:00
<?php
namespace MichaelAChrisco\ReadOnly;
2016-03-28 11:15:08 -07:00
trait ReadOnlyTrait {
/**
* returns false on create
* @method create
* @param array $attributes
* @return false
*/
static function create(array $attributes = []){
return false;
}
/**
* returns false on forceCreate
* @method forceCreate
* @param array $attributes
* @return false
*/
static function forceCreate(array $attributes){
return false;
}
/**
* returns false on save
* @method save
* @param array $options
* @return false
*/
2016-03-28 11:15:08 -07:00
public function save(array $options = []){
return false;
}
/**
* returns false on update
* @method update
* @param [type] $attributes
* @param [type] $options
* @return false
*/
2016-03-28 11:15:08 -07:00
public function update(array $attributes = [], array $options = []){
return false;
}
/**
* returns false on firstOrCreate
* @method firstOrCreate
* @param array $arr
* @return false
*/
2016-03-28 11:15:08 -07:00
static function firstOrCreate(array $arr){
return false;
}
/**
* returns false on firstOrNew
* @method firstOrNew
* @param array $arr
* @return false
*/
2016-03-28 11:15:08 -07:00
static function firstOrNew(array $arr){
return false;
}
/**
* returns false on delete
* @method delete
* @return false
*/
2016-03-28 11:15:08 -07:00
public function delete(){
return false;
}
/**
* returns false on destroy
* @method destroy
* @param mixed $ids
* @return false
*/
2016-03-28 11:15:08 -07:00
static function destroy($ids){
return false;
}
/**
* returns false on restore
* @method restore
* @return false
*/
2016-03-28 11:15:08 -07:00
public function restore(){
return false;
}
/**
* returns false on forceDelete
* @method forceDelete
* @return false
*/
2016-03-28 11:15:08 -07:00
public function forceDelete(){
return false;
}
}