-
-
Save benabdullah/03753936dfdb98fbfdef01a2538a8b8a to your computer and use it in GitHub Desktop.
Zn Framework İmport view için wizard değişikliği
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
<? | |
public function use (String $page, Array $data = NULL, Bool $obGetContents = false, String $randomPageDir = VIEWS_DIR) | |
{ | |
if (!empty(Properties::$parameters['usable'])) { | |
$obGetContents = Properties::$parameters['usable']; | |
} | |
if (!empty(Properties::$parameters['data'])) { | |
$data = Properties::$parameters['data']; | |
} | |
Properties::$parameters = []; | |
$data = array_merge((array)$data, Views::$data, ...\ZN\In::$view); | |
/* | |
* Ekleme Başlangıcı | |
* eğer template uzantısına sahipse direk templateWizard methoduna yollayalım | |
*/ | |
if (stristr($page, $this->templateWizardExtension)) { | |
return $this->_templateWizard($page, $data, $obGetContents, $randomPageDir); | |
} | |
# Değilse Normal dosya varmı, varsa normali aç, yoksa wizardlısını aç diyelim. | |
else { | |
$randomPageVariable = suffix($page, '.php'); | |
if (file_exists($randomPageDir . $randomPageVariable)) { | |
return $this->_page($page, $data, $obGetContents, $randomPageDir); | |
} | |
return $this->_templateWizard($page . $this->templateWizardExtension, $data, $obGetContents, $randomPageDir); | |
} | |
# varolan kodlar | |
/* if stristr($page, $this->templateWizardExtension) ) | |
{ | |
return $this->_templateWizard($page, $data, $obGetContents, $randomPageDir); | |
} | |
return $this->_page($page, $data, $obGetContents, $randomPageDir); | |
*/ | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment