39 lines
814 B
PHP
39 lines
814 B
PHP
<?php
|
|
|
|
/**
|
|
* file: vault_two.php
|
|
*
|
|
* Major re-working of the vault idea.
|
|
|
|
*/
|
|
|
|
class UsersMigrateShell extends Shell {
|
|
|
|
|
|
var $uses = array('User', 'Contact', 'PrincipleContact', 'PurchaseOrder');
|
|
|
|
|
|
function main() {
|
|
|
|
$principleContactsCount = $this->PrincipleContact->find('count');
|
|
$contactsCount = $this->Contact->find('count');
|
|
$usersCount = $this->User->find('count');
|
|
|
|
$this->printCountLine($principleContactsCount, 'Principle Contact');
|
|
$this->printCountLine($contactsCount, 'Customer Contacts');
|
|
$this->printCountLine($usersCount, 'Users');
|
|
|
|
$totalCount = $principleContactsCount + $contactsCount + $usersCount;
|
|
$this->printCountLine($totalCount, 'Total Users after migration');
|
|
|
|
}
|
|
|
|
|
|
function printCountLine($count, $model) {
|
|
echo $model ." count:". $count ."\n";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
?>
|