Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F8198785
DomainObserver.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DomainObserver.php
View Options
<?php
namespace
App\Observers
;
use
App\Domain
;
class
DomainObserver
{
/**
* Handle the domain "created" event.
*
* @param \App\Domain $domain The domain.
*
* @return void
*/
public
function
creating
(
Domain
$domain
)
{
while
(
true
)
{
$allegedly_unique
=
\App\Utils
::
uuidInt
();
if
(!
Domain
::
find
(
$allegedly_unique
))
{
$domain
->{
$domain
->
getKeyName
()}
=
$allegedly_unique
;
break
;
}
}
$domain
->
status
|=
Domain
::
STATUS_NEW
;
}
/**
* Handle the domain "created" event.
*
* @param \App\Domain $domain The domain.
*
* @return void
*/
public
function
created
(
Domain
$domain
)
{
// Create domain record in LDAP, then check if it exists in DNS
/*
$chain = [
new \App\Jobs\DomainVerify($domain),
];
\App\Jobs\DomainCreate::withChain($chain)->dispatch($domain);
*/
\App\Jobs\DomainCreate
::
dispatch
(
$domain
);
}
/**
* Handle the domain "updated" event.
*
* @param \App\Domain $domain The domain.
*
* @return void
*/
public
function
updated
(
Domain
$domain
)
{
//
}
/**
* Handle the domain "deleted" event.
*
* @param \App\Domain $domain The domain.
*
* @return void
*/
public
function
deleted
(
Domain
$domain
)
{
//
}
/**
* Handle the domain "restored" event.
*
* @param \App\Domain $domain The domain.
*
* @return void
*/
public
function
restored
(
Domain
$domain
)
{
//
}
/**
* Handle the domain "force deleted" event.
*
* @param \App\Domain $domain The domain.
*
* @return void
*/
public
function
forceDeleted
(
Domain
$domain
)
{
//
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jul 8, 8:56 PM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1051997
Default Alt Text
DomainObserver.php (1 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment