-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18b3161
commit 00b790f
Showing
6 changed files
with
64 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
namespace Df\Zoho; | ||
/** | ||
* 2017-07-06 | ||
* @see \Df\ZohoBI\App | ||
* @see \Dfe\ZohoCRM\App | ||
*/ | ||
abstract class App { | ||
/** | ||
* 2017-07-06 | ||
* @final I do not use the PHP «final» keyword here to allow refine the return type using PHPDoc. | ||
* @return Settings | ||
*/ | ||
function ss() {return Settings::convention($this);} | ||
|
||
/** | ||
* 2017-07-06 It returns one of the following strings: «Books», «CRM», «Inventory». | ||
* @used-by titleLc() | ||
* @used-by \Df\ZohoBI\API\Validator::title() | ||
* @return string | ||
*/ | ||
final function title() {return dfc($this, function() {return df_assert_in(df_result_sne( | ||
df_trim_text_left(df_class_second($this), 'Zoho') | ||
), ['Books', 'CRM', 'Inventory']);});} | ||
|
||
/** | ||
* 2017-07-06 It returns one of the following strings: «books», «crm», «inventory» | ||
* @used-by \Df\ZohoBI\API\Client::uriBase() | ||
* @used-by \Df\Zoho\Settings::prefix() | ||
* @return string | ||
*/ | ||
final function titleLc() {return strtolower($this->title());} | ||
|
||
/** | ||
* 2017-07-06. | ||
* @used-by df_zoho_app() | ||
* @param string|object $c | ||
* @return self | ||
*/ | ||
final static function s($c) {return dfcf(function($c) {return df_new(df_con_heir($c, __CLASS__));}, [$c]);} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
use Df\Zoho\App; | ||
/** | ||
* 2017-07-06 | ||
* @used-by \Df\ZohoBI\API\Validator::title() | ||
* @used-by \Df\ZohoBI\Source\Organization::app() | ||
* @param string|object $c | ||
* @return App | ||
*/ | ||
function df_zoho_app($c) {return App::s($c);} |
This file was deleted.
Oops, something went wrong.