Skip to content

Commit c4abc43

Browse files
authored
Create EntityException.php
1 parent 7380d0a commit c4abc43

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php namespace CodeIgniter\Exceptions;
2+
3+
/**
4+
* Entity Exceptions.
5+
*/
6+
7+
class EntityException extends AlertError
8+
{
9+
10+
/**
11+
* Error code
12+
*
13+
* @var integer
14+
*/
15+
protected $code = 3;
16+
17+
public static function forTryingToAccessNonExistentProperty(string $property, string $on)
18+
{
19+
throw new static(lang('Entity.tryingToAccessNonExistentProperty', [$property, $on]));
20+
}
21+
22+
}

0 commit comments

Comments
 (0)